1313#include < __fwd/pair.h>
1414#include < __type_traits/conditional.h>
1515#include < __type_traits/integral_constant.h>
16- #include < __type_traits/is_same.h>
1716#include < __type_traits/remove_const.h>
1817#include < __type_traits/remove_const_ref.h>
1918
@@ -29,19 +28,18 @@ struct __extract_key_self_tag {};
2928struct __extract_key_first_tag {};
3029
3130template <class _ValTy , class _Key , class _RawValTy = __remove_const_ref_t <_ValTy> >
32- struct __can_extract_key
33- : __conditional_t <_IsSame<_RawValTy, _Key>::value, __extract_key_self_tag, __extract_key_fail_tag> { };
31+ struct __can_extract_key : __conditional_t <__is_same(_RawValTy, _Key), __extract_key_self_tag, __extract_key_fail_tag> {
32+ };
3433
3534template <class _Pair , class _Key , class _First , class _Second >
3635struct __can_extract_key <_Pair, _Key, pair<_First, _Second> >
37- : __conditional_t <_IsSame<__remove_const_t <_First>, _Key>::value, __extract_key_first_tag, __extract_key_fail_tag> {
38- };
36+ : __conditional_t <__is_same(__remove_const_t <_First>, _Key), __extract_key_first_tag, __extract_key_fail_tag> {};
3937
4038// __can_extract_map_key uses true_type/false_type instead of the tags.
4139// It returns true if _Key != _ContainerValueTy (the container is a map not a set)
4240// and _ValTy == _Key.
4341template <class _ValTy , class _Key , class _ContainerValueTy , class _RawValTy = __remove_const_ref_t <_ValTy> >
44- struct __can_extract_map_key : integral_constant<bool , _IsSame< _RawValTy, _Key>::value > {};
42+ struct __can_extract_map_key : integral_constant<bool , __is_same( _RawValTy, _Key) > {};
4543
4644// This specialization returns __extract_key_fail_tag for non-map containers
4745// because _Key == _ContainerValueTy
0 commit comments