5#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_TYPE_TRAITS_HAS_OVERLOADED_ADDRESS_OPERATOR_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_TYPE_TRAITS_HAS_OVERLOADED_ADDRESS_OPERATOR_HPP_
12#include "arene/base/stdlib_choice/declval.hpp"
13#include "arene/base/stdlib_choice/enable_if.hpp"
14#include "arene/base/stdlib_choice/integral_constant.hpp"
15#include "arene/base/stdlib_choice/is_class.hpp"
16#include "arene/base/stdlib_choice/is_same.hpp"
21namespace has_overloaded_address_operator_detail {
29 std::is_same<decltype(&std::declval<T&>()), T*>::value &&
31struct has_normal_address_operator_types {};
38template <typename T, typename = decltype(static_cast<T* (T::*)()>(&T::operator&))>
39struct has_overloaded_address_operator_for_lvalue {};
46template <typename T, typename = decltype(static_cast<T const* (T::*)() const>(&T::operator&))>
47struct has_overloaded_address_operator_for_const_lvalue {};
61 has_overloaded_address_operator_detail::has_overloaded_address_operator_for_const_lvalue,
Type trait to check if a type has an overloaded address operator; the class derives from true_type if...
Definition has_overloaded_address_operator.hpp:69
A helper class to represent a compile-time constant with the specified type and value....
Definition integral_constant.hpp:23
static constexpr value_type value
Definition integral_constant.hpp:34
Definition accumulate.hpp:37
constexpr bool substitution_succeeds
Determines if a template can be instantiated successfully, similar to C++20's requires clause.
constexpr bool has_overloaded_address_operator_v
Type trait to check if a type has an overloaded address operator; the value is true if the type has a...
Definition accumulate.hpp:36
typename enable_if< Condition, Type >::type enable_if_t
Type alias to support constraining templates. Is an alias for the specified type if the Condition is ...
Definition enable_if.hpp:41
auto declval() noexcept -> T &&
A dummy function that is declared but not defined, with a user-specified return type,...