From 6cf5089b182e332c30f520ef6cf19a47bf37ce37 Mon Sep 17 00:00:00 2001 From: Mathew Sutcliffe Date: Sun, 23 Mar 2014 21:01:53 +0000 Subject: [PATCH] minor style improvement: traits class should have a static const bool value member --- src/blackmisc/tuple.h | 4 ++-- src/blackmisc/tuple_private.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/blackmisc/tuple.h b/src/blackmisc/tuple.h index 4a9500928..07edd4229 100644 --- a/src/blackmisc/tuple.h +++ b/src/blackmisc/tuple.h @@ -49,7 +49,7 @@ template <> class TupleConverter \ { \ friend class T; \ - static_assert(Private::HasEnabledTupleConversion::type::value, \ + static_assert(Private::HasEnabledTupleConversion::value, \ "Missing BLACK_ENABLE_TUPLE_CONVERSION macro in " #T); \ static auto toTuple(const T &o) -> decltype(std::tie MEMBERS) \ { \ @@ -78,7 +78,7 @@ template class TupleConverter> \ { \ friend class T; \ - static_assert(Private::HasEnabledTupleConversion>::type::value,\ + static_assert(Private::HasEnabledTupleConversion>::value, \ "Missing BLACK_ENABLE_TUPLE_CONVERSION macro in " #T); \ static auto toTuple(const T &o) -> decltype(std::tie MEMBERS) \ { \ diff --git a/src/blackmisc/tuple_private.h b/src/blackmisc/tuple_private.h index f250ea2ad..ddfefad4b 100644 --- a/src/blackmisc/tuple_private.h +++ b/src/blackmisc/tuple_private.h @@ -41,6 +41,7 @@ namespace BlackMisc struct HasEnabledTupleConversion { typedef decltype(hasEnabledTupleConversionHelper(static_cast(nullptr))) type; + static const bool value = type::value; }; // Using tag dispatch to select which implementation of compare() to use