From: khizmax Date: Tue, 21 Jul 2015 06:09:47 +0000 (+0300) Subject: Fixed make_comparator metafunction X-Git-Tag: v2.1.0~178 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3bfad2c398ec191a6fabb20efe21a259301ab0ce;p=libcds.git Fixed make_comparator metafunction --- diff --git a/cds/intrusive/impl/multilevel_hashset.h b/cds/intrusive/impl/multilevel_hashset.h index ecdf13e5..99dcdc83 100644 --- a/cds/intrusive/impl/multilevel_hashset.h +++ b/cds/intrusive/impl/multilevel_hashset.h @@ -88,7 +88,7 @@ namespace cds { namespace intrusive { typedef typename traits::hash_accessor hash_accessor; ///< Hash accessor functor static_assert(!std::is_same< hash_accessor, cds::opt::none >::value, "hash_accessor functor must be specified" ); - /// Hash type + /// Hash type defined as \p hash_accessor return type typedef typename std::decay< typename std::remove_reference< decltype( hash_accessor()( std::declval()) ) diff --git a/cds/opt/compare.h b/cds/opt/compare.h index 4be39579..d59de7ab 100644 --- a/cds/opt/compare.h +++ b/cds/opt/compare.h @@ -166,7 +166,7 @@ namespace cds { namespace opt { } }; - template >::type > + template >::type > struct make_comparator_from { typedef typename Traits::compare compare; @@ -185,7 +185,12 @@ namespace cds { namespace opt { template - using make_comparator = make_comparator_from< T, Traits, typename std::conditional< Forced, make_comparator_from_less< std::less>, opt::none >::type >; + using make_comparator = make_comparator_from< T, Traits, + typename std::conditional< + Forced, + typename make_comparator_from_less< std::less>::type, + opt::none + >::type >; template struct make_comparator_from_option_list