concept
std::common_with
- Header
<concepts>- Draft
- [concepts.syn]
- Scope
std- cppreference
- std::common_with
Synopsis
template<class T, class U>
concept common_with = same_as<common_type_t<T, U>, common_type_t<U, T>> && requires {
static_cast<common_type_t<T, U>>(std::declval<T>());
static_cast<common_type_t<T, U>>(std::declval<U>());
} && common_reference_with<add_lvalue_reference_t<const T>, add_lvalue_reference_t<const U>> &&
common_reference_with<add_lvalue_reference_t<common_type_t<T, U>>,
common_reference_t<add_lvalue_reference_t<const T>, add_lvalue_reference_t<const U>>>;