From f06502606e6e043487d9154ce4127e81e1181549 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Tue, 19 Feb 2019 18:22:00 +0000 Subject: Allow customising ElementComp in flat_{map,multimap,multiset,set}. --- include/flat_map.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'include') diff --git a/include/flat_map.h b/include/flat_map.h index bef1404e4..62815168b 100644 --- a/include/flat_map.h +++ b/include/flat_map.h @@ -200,10 +200,10 @@ class flat_map_base } // namespace detail -template > -class flat_set : public detail::flat_map_base +template , typename ElementComp = Comp> +class flat_set : public detail::flat_map_base { - typedef detail::flat_map_base base_t; + typedef detail::flat_map_base base_t; public: typedef typename base_t::iterator iterator; @@ -240,10 +240,10 @@ class flat_set : public detail::flat_map_base } }; -template > -class flat_multiset : public detail::flat_map_base +template , typename ElementComp = Comp> +class flat_multiset : public detail::flat_map_base { - typedef detail::flat_map_base base_t; + typedef detail::flat_map_base base_t; public: typedef typename base_t::iterator iterator; @@ -280,10 +280,10 @@ class flat_multiset : public detail::flat_map_base } }; -template > -class flat_map : public detail::flat_map_base, Comp, T, detail::map_pair_compare, Comp> > +template , typename ElementComp = Comp > +class flat_map : public detail::flat_map_base, Comp, T, detail::map_pair_compare, ElementComp> > { - typedef detail::flat_map_base, Comp, T, detail::map_pair_compare, Comp> > base_t; + typedef detail::flat_map_base, Comp, T, detail::map_pair_compare, ElementComp> > base_t; public: typedef typename base_t::iterator iterator; @@ -333,10 +333,10 @@ class flat_map : public detail::flat_map_base, Comp, T, detail:: } }; -template > -class flat_multimap : public detail::flat_map_base, Comp, T, detail::map_pair_compare, Comp> > +template , typename ElementComp = Comp > +class flat_multimap : public detail::flat_map_base, Comp, T, detail::map_pair_compare, ElementComp> > { - typedef detail::flat_map_base, Comp, T, detail::map_pair_compare, Comp> > base_t; + typedef detail::flat_map_base, Comp, T, detail::map_pair_compare, ElementComp> > base_t; public: typedef typename base_t::iterator iterator; -- cgit v1.2.3