Fixes to flat_map when used as an adaptor from regression tests errors in Mingw.

This commit is contained in:
Ion Gaztañaga
2017-08-28 11:58:43 +02:00
parent c123accab1
commit 9ee836ee3d
4 changed files with 18 additions and 9 deletions

View File

@@ -460,13 +460,14 @@ class flat_tree
private: private:
typedef allocator_traits<stored_allocator_type> stored_allocator_traits; typedef allocator_traits<stored_allocator_type> stored_allocator_traits;
public:
typedef typename container_detail::if_c typedef typename container_detail::if_c
<has_stored_allocator_type, const stored_allocator_type &, allocator_type>::type get_stored_allocator_const_return_t; <has_stored_allocator_type, const stored_allocator_type &, allocator_type>::type get_stored_allocator_const_return_t;
typedef typename container_detail::if_c typedef typename container_detail::if_c
<has_stored_allocator_type, stored_allocator_type &, allocator_type>::type get_stored_allocator_noconst_return_t; <has_stored_allocator_type, stored_allocator_type &, allocator_type>::type get_stored_allocator_noconst_return_t;
public:
BOOST_CONTAINER_FORCEINLINE flat_tree() BOOST_CONTAINER_FORCEINLINE flat_tree()
: m_data() : m_data()
{ } { }

View File

@@ -158,6 +158,11 @@ class flat_map
{ return m_flat_tree; } { return m_flat_tree; }
private: private:
typedef typename tree_t::get_stored_allocator_const_return_t get_stored_allocator_const_return_t;
typedef typename tree_t::get_stored_allocator_noconst_return_t get_stored_allocator_noconst_return_t;
typedef typename impl_tree_t::get_stored_allocator_const_return_t impl_get_stored_allocator_const_return_t;
typedef typename impl_tree_t::get_stored_allocator_noconst_return_t impl_get_stored_allocator_noconst_return_t;
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
public: public:
@@ -493,8 +498,11 @@ class flat_map
//! <b>Complexity</b>: Constant. //! <b>Complexity</b>: Constant.
//! //!
//! <b>Note</b>: Non-standard extension. //! <b>Note</b>: Non-standard extension.
BOOST_CONTAINER_FORCEINLINE stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW BOOST_CONTAINER_FORCEINLINE get_stored_allocator_noconst_return_t get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
{ return container_detail::force<stored_allocator_type>(m_flat_tree.get_stored_allocator()); } {
impl_get_stored_allocator_noconst_return_t r = m_flat_tree.get_stored_allocator();
return container_detail::force<stored_allocator_type>(r);
}
//! <b>Effects</b>: Returns a reference to the internal allocator. //! <b>Effects</b>: Returns a reference to the internal allocator.
//! //!
@@ -503,8 +511,11 @@ class flat_map
//! <b>Complexity</b>: Constant. //! <b>Complexity</b>: Constant.
//! //!
//! <b>Note</b>: Non-standard extension. //! <b>Note</b>: Non-standard extension.
BOOST_CONTAINER_FORCEINLINE const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_CONTAINER_FORCEINLINE get_stored_allocator_const_return_t get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
{ return container_detail::force<const stored_allocator_type>(m_flat_tree.get_stored_allocator()); } {
impl_get_stored_allocator_const_return_t r = m_flat_tree.get_stored_allocator();
return container_detail::force<const stored_allocator_type>(r);
}
////////////////////////////////////////////// //////////////////////////////////////////////
// //

View File

@@ -89,13 +89,11 @@ namespace container{
template class flat_map template class flat_map
< test::movable_and_copyable_int < test::movable_and_copyable_int
, test::movable_and_copyable_int
, test::movable_and_copyable_int , test::movable_and_copyable_int
, std::less<test::movable_and_copyable_int> , std::less<test::movable_and_copyable_int>
, std::vector<test_pair_t> , std::vector<test_pair_t>
>; >;
} //container_detail {
}} //boost::container }} //boost::container
#endif #endif

View File

@@ -86,7 +86,6 @@ template class flat_set
, std::vector<test::movable_and_copyable_int> , std::vector<test::movable_and_copyable_int>
>; >;
} //container_detail {
}} //boost::container }} //boost::container
#endif #endif