aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/almalloc.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/common/almalloc.h b/common/almalloc.h
index b5821784..270cd76c 100644
--- a/common/almalloc.h
+++ b/common/almalloc.h
@@ -113,10 +113,14 @@ namespace detail_ {
using void_t = void;
template<typename T, typename = void>
- constexpr bool has_to_address = false;
+ struct has_to_address_ : public std::false_type { };
template<typename T>
- constexpr bool has_to_address<T,
- void_t<decltype(std::pointer_traits<T>::to_address(std::declval<const T&>()))>> = true;
+ struct has_to_address_<T,
+ void_t<decltype(std::pointer_traits<T>::to_address(std::declval<const T&>()))>>
+ : public std::true_type
+ { };
+ template<typename T>
+ constexpr bool has_to_address = has_to_address_<T>::value;
} // namespace detail_
template<typename T>