aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-01-30 18:54:58 -0800
committerChris Robinson <[email protected]>2023-01-30 18:54:58 -0800
commitc8ad6422d63196040ea68c03874b0ff8f2bf32cb (patch)
treeb3187ebc0b01eda1018bc0bfcbed4a78a039156c
parent0985abc6536f64a4ff16fd159336173782fde698 (diff)
Try to fix has_to_address
-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>