From 3bfad2c398ec191a6fabb20efe21a259301ab0ce Mon Sep 17 00:00:00 2001 From: khizmax Date: Tue, 21 Jul 2015 09:09:47 +0300 Subject: [PATCH] Fixed make_comparator metafunction --- cds/intrusive/impl/multilevel_hashset.h | 2 +- cds/opt/compare.h | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) 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 -- 2.34.1