File indexing completed on 2026-05-03 08:13:16
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef _LIBCPP___CONCEPTS_COMMON_WITH_H
0010 #define _LIBCPP___CONCEPTS_COMMON_WITH_H
0011
0012 #include <__concepts/common_reference_with.h>
0013 #include <__concepts/same_as.h>
0014 #include <__config>
0015 #include <__type_traits/add_lvalue_reference.h>
0016 #include <__type_traits/common_reference.h>
0017 #include <__type_traits/common_type.h>
0018 #include <__utility/declval.h>
0019
0020 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
0021 # pragma GCC system_header
0022 #endif
0023
0024 _LIBCPP_BEGIN_NAMESPACE_STD
0025
0026 #if _LIBCPP_STD_VER >= 20
0027
0028
0029
0030
0031 template <class _Tp, class _Up>
0032 concept common_with =
0033 same_as<common_type_t<_Tp, _Up>, common_type_t<_Up, _Tp>> &&
0034 requires {
0035 static_cast<common_type_t<_Tp, _Up>>(std::declval<_Tp>());
0036 static_cast<common_type_t<_Tp, _Up>>(std::declval<_Up>());
0037 } &&
0038 common_reference_with<
0039 add_lvalue_reference_t<const _Tp>,
0040 add_lvalue_reference_t<const _Up>> &&
0041 common_reference_with<
0042 add_lvalue_reference_t<common_type_t<_Tp, _Up>>,
0043 common_reference_t<
0044 add_lvalue_reference_t<const _Tp>,
0045 add_lvalue_reference_t<const _Up>>>;
0046
0047
0048 #endif
0049
0050 _LIBCPP_END_NAMESPACE_STD
0051
0052 #endif