diff --git a/include/boost/unordered/unordered_flat_map.hpp b/include/boost/unordered/unordered_flat_map.hpp index 04bbc55c..790eb248 100644 --- a/include/boost/unordered/unordered_flat_map.hpp +++ b/include/boost/unordered/unordered_flat_map.hpp @@ -32,10 +32,8 @@ namespace boost { #pragma warning(disable : 4714) /* marked as __forceinline not inlined */ #endif - template - class unordered_flat_map - { - struct map_types + namespace detail { + template struct flat_map_types { using key_type = Key; using raw_key_type = typename std::remove_const::type; @@ -78,6 +76,12 @@ namespace boost { boost::allocator_destroy(al, p); } }; + } // namespace detail + + template + class unordered_flat_map + { + using map_types = detail::flat_map_types; using table_type = detail::foa::table - class unordered_flat_set - { - struct set_types + namespace detail { + template struct flat_set_types { using key_type = Key; using init_type = Key; @@ -62,6 +60,12 @@ namespace boost { boost::allocator_destroy(al, p); } }; + } // namespace detail + + template + class unordered_flat_set + { + using set_types = detail::flat_set_types; using table_type = detail::foa::table - class unordered_node_map - { - struct map_types + namespace detail { + template struct node_map_types { using key_type = Key; using raw_key_type = typename std::remove_const::type; @@ -73,7 +71,7 @@ namespace boost { template static void construct(A& al, storage_type* p, Args&&... args) { - *p=boost::to_address(boost::allocator_allocate(al, 1)); + *p = boost::to_address(boost::allocator_allocate(al, 1)); try { boost::allocator_construct(al, *p, std::forward(args)...); } catch (...) { @@ -96,6 +94,12 @@ namespace boost { } } }; + } // namespace detail + + template + class unordered_node_map + { + using map_types = detail::node_map_types; using table_type = detail::foa::table