Skip to content

Commit ab3fcc5

Browse files
committed
[libc++] s/_VSTD::declval/declval/g. NFCI.
1 parent 72995a4 commit ab3fcc5

File tree

13 files changed

+79
-79
lines changed

13 files changed

+79
-79
lines changed

libcxx/include/__functional_base

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,9 +392,9 @@ public:
392392
reference_wrapper(type& __f) _NOEXCEPT
393393
: __f_(_VSTD::addressof(__f)) {}
394394
#else
395-
template <class _Up, class = _EnableIf<!__is_same_uncvref<_Up, reference_wrapper>::value, decltype(__fun(_VSTD::declval<_Up>())) >>
395+
template <class _Up, class = _EnableIf<!__is_same_uncvref<_Up, reference_wrapper>::value, decltype(__fun(declval<_Up>())) >>
396396
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
397-
reference_wrapper(_Up&& __u) _NOEXCEPT_(noexcept(__fun(_VSTD::declval<_Up>()))) {
397+
reference_wrapper(_Up&& __u) _NOEXCEPT_(noexcept(__fun(declval<_Up>()))) {
398398
type& __f = static_cast<_Up&&>(__u);
399399
__f_ = _VSTD::addressof(__f);
400400
}

libcxx/include/__memory/construct_at.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
2828
#if _LIBCPP_STD_VER > 17
2929

3030
template<class _Tp, class ..._Args, class = decltype(
31-
::new (_VSTD::declval<void*>()) _Tp(_VSTD::declval<_Args>()...)
31+
::new (declval<void*>()) _Tp(declval<_Args>()...)
3232
)>
3333
_LIBCPP_INLINE_VISIBILITY
3434
constexpr _Tp* construct_at(_Tp* __location, _Args&& ...__args) {

libcxx/include/__memory/shared_ptr.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -382,15 +382,15 @@ struct __compatible_with
382382
template <class _Ptr, class = void>
383383
struct __is_deletable : false_type { };
384384
template <class _Ptr>
385-
struct __is_deletable<_Ptr, decltype(delete _VSTD::declval<_Ptr>())> : true_type { };
385+
struct __is_deletable<_Ptr, decltype(delete declval<_Ptr>())> : true_type { };
386386

387387
template <class _Ptr, class = void>
388388
struct __is_array_deletable : false_type { };
389389
template <class _Ptr>
390-
struct __is_array_deletable<_Ptr, decltype(delete[] _VSTD::declval<_Ptr>())> : true_type { };
390+
struct __is_array_deletable<_Ptr, decltype(delete[] declval<_Ptr>())> : true_type { };
391391

392392
template <class _Dp, class _Pt,
393-
class = decltype(_VSTD::declval<_Dp>()(_VSTD::declval<_Pt>()))>
393+
class = decltype(declval<_Dp>()(declval<_Pt>()))>
394394
static true_type __well_formed_deleter_test(int);
395395

396396
template <class, class>

libcxx/include/algorithm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -817,8 +817,8 @@ struct __debug_less
817817
template <class _LHS, class _RHS>
818818
_LIBCPP_CONSTEXPR_AFTER_CXX17
819819
inline _LIBCPP_INLINE_VISIBILITY
820-
decltype((void)_VSTD::declval<_Compare&>()(
821-
_VSTD::declval<_LHS &>(), _VSTD::declval<_RHS &>()))
820+
decltype((void)declval<_Compare&>()(
821+
declval<_LHS &>(), declval<_RHS &>()))
822822
__do_compare_assert(int, _LHS & __l, _RHS & __r) {
823823
_LIBCPP_ASSERT(!__comp_(__l, __r),
824824
"Comparator does not induce a strict weak ordering");
@@ -1678,7 +1678,7 @@ struct __unwrap_iter_impl<_Iter, true> {
16781678

16791679
template<class _Iter, class _Impl = __unwrap_iter_impl<_Iter> >
16801680
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
1681-
decltype(_Impl::__apply(_VSTD::declval<_Iter>()))
1681+
decltype(_Impl::__apply(declval<_Iter>()))
16821682
__unwrap_iter(_Iter __i) _NOEXCEPT
16831683
{
16841684
return _Impl::__apply(__i);

libcxx/include/concepts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ template<class _Tp, class _Up>
180180
concept common_with =
181181
same_as<common_type_t<_Tp, _Up>, common_type_t<_Up, _Tp>> &&
182182
requires {
183-
static_cast<common_type_t<_Tp, _Up>>(_VSTD::declval<_Tp>());
184-
static_cast<common_type_t<_Tp, _Up>>(_VSTD::declval<_Up>());
183+
static_cast<common_type_t<_Tp, _Up>>(declval<_Tp>());
184+
static_cast<common_type_t<_Tp, _Up>>(declval<_Up>());
185185
} &&
186186
common_reference_with<
187187
add_lvalue_reference_t<const _Tp>,

libcxx/include/experimental/propagate_const

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ template <class _Tp>
135135
class propagate_const
136136
{
137137
public:
138-
typedef remove_reference_t<decltype(*_VSTD::declval<_Tp&>())> element_type;
138+
typedef remove_reference_t<decltype(*declval<_Tp&>())> element_type;
139139

140140
static_assert(!is_array<_Tp>::value,
141141
"Instantiation of propagate_const with an array type is ill-formed.");

libcxx/include/istream

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1383,7 +1383,7 @@ struct __is_istreamable : false_type { };
13831383

13841384
template <class _Stream, class _Tp>
13851385
struct __is_istreamable<_Stream, _Tp, decltype(
1386-
_VSTD::declval<_Stream>() >> _VSTD::declval<_Tp>(), void()
1386+
declval<_Stream>() >> declval<_Tp>(), void()
13871387
)> : true_type { };
13881388

13891389
template <class _Stream, class _Tp, class = typename enable_if<

libcxx/include/memory

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ struct __is_allocator : false_type {};
903903
template<typename _Alloc>
904904
struct __is_allocator<_Alloc,
905905
typename __void_t<typename _Alloc::value_type>::type,
906-
typename __void_t<decltype(_VSTD::declval<_Alloc&>().allocate(size_t(0)))>::type
906+
typename __void_t<decltype(declval<_Alloc&>().allocate(size_t(0)))>::type
907907
>
908908
: true_type {};
909909

libcxx/include/optional

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,8 +1030,8 @@ template<class T>
10301030
template <class _Tp, class _Up>
10311031
_LIBCPP_INLINE_VISIBILITY constexpr
10321032
_EnableIf<
1033-
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() ==
1034-
_VSTD::declval<const _Up&>()), bool>,
1033+
is_convertible_v<decltype(declval<const _Tp&>() ==
1034+
declval<const _Up&>()), bool>,
10351035
bool
10361036
>
10371037
operator==(const optional<_Tp>& __x, const optional<_Up>& __y)
@@ -1046,8 +1046,8 @@ operator==(const optional<_Tp>& __x, const optional<_Up>& __y)
10461046
template <class _Tp, class _Up>
10471047
_LIBCPP_INLINE_VISIBILITY constexpr
10481048
_EnableIf<
1049-
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() !=
1050-
_VSTD::declval<const _Up&>()), bool>,
1049+
is_convertible_v<decltype(declval<const _Tp&>() !=
1050+
declval<const _Up&>()), bool>,
10511051
bool
10521052
>
10531053
operator!=(const optional<_Tp>& __x, const optional<_Up>& __y)
@@ -1062,8 +1062,8 @@ operator!=(const optional<_Tp>& __x, const optional<_Up>& __y)
10621062
template <class _Tp, class _Up>
10631063
_LIBCPP_INLINE_VISIBILITY constexpr
10641064
_EnableIf<
1065-
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() <
1066-
_VSTD::declval<const _Up&>()), bool>,
1065+
is_convertible_v<decltype(declval<const _Tp&>() <
1066+
declval<const _Up&>()), bool>,
10671067
bool
10681068
>
10691069
operator<(const optional<_Tp>& __x, const optional<_Up>& __y)
@@ -1078,8 +1078,8 @@ operator<(const optional<_Tp>& __x, const optional<_Up>& __y)
10781078
template <class _Tp, class _Up>
10791079
_LIBCPP_INLINE_VISIBILITY constexpr
10801080
_EnableIf<
1081-
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() >
1082-
_VSTD::declval<const _Up&>()), bool>,
1081+
is_convertible_v<decltype(declval<const _Tp&>() >
1082+
declval<const _Up&>()), bool>,
10831083
bool
10841084
>
10851085
operator>(const optional<_Tp>& __x, const optional<_Up>& __y)
@@ -1094,8 +1094,8 @@ operator>(const optional<_Tp>& __x, const optional<_Up>& __y)
10941094
template <class _Tp, class _Up>
10951095
_LIBCPP_INLINE_VISIBILITY constexpr
10961096
_EnableIf<
1097-
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() <=
1098-
_VSTD::declval<const _Up&>()), bool>,
1097+
is_convertible_v<decltype(declval<const _Tp&>() <=
1098+
declval<const _Up&>()), bool>,
10991099
bool
11001100
>
11011101
operator<=(const optional<_Tp>& __x, const optional<_Up>& __y)
@@ -1110,8 +1110,8 @@ operator<=(const optional<_Tp>& __x, const optional<_Up>& __y)
11101110
template <class _Tp, class _Up>
11111111
_LIBCPP_INLINE_VISIBILITY constexpr
11121112
_EnableIf<
1113-
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() >=
1114-
_VSTD::declval<const _Up&>()), bool>,
1113+
is_convertible_v<decltype(declval<const _Tp&>() >=
1114+
declval<const _Up&>()), bool>,
11151115
bool
11161116
>
11171117
operator>=(const optional<_Tp>& __x, const optional<_Up>& __y)
@@ -1224,8 +1224,8 @@ operator>=(nullopt_t, const optional<_Tp>& __x) noexcept
12241224
template <class _Tp, class _Up>
12251225
_LIBCPP_INLINE_VISIBILITY constexpr
12261226
_EnableIf<
1227-
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() ==
1228-
_VSTD::declval<const _Up&>()), bool>,
1227+
is_convertible_v<decltype(declval<const _Tp&>() ==
1228+
declval<const _Up&>()), bool>,
12291229
bool
12301230
>
12311231
operator==(const optional<_Tp>& __x, const _Up& __v)
@@ -1236,8 +1236,8 @@ operator==(const optional<_Tp>& __x, const _Up& __v)
12361236
template <class _Tp, class _Up>
12371237
_LIBCPP_INLINE_VISIBILITY constexpr
12381238
_EnableIf<
1239-
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() ==
1240-
_VSTD::declval<const _Up&>()), bool>,
1239+
is_convertible_v<decltype(declval<const _Tp&>() ==
1240+
declval<const _Up&>()), bool>,
12411241
bool
12421242
>
12431243
operator==(const _Tp& __v, const optional<_Up>& __x)
@@ -1248,8 +1248,8 @@ operator==(const _Tp& __v, const optional<_Up>& __x)
12481248
template <class _Tp, class _Up>
12491249
_LIBCPP_INLINE_VISIBILITY constexpr
12501250
_EnableIf<
1251-
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() !=
1252-
_VSTD::declval<const _Up&>()), bool>,
1251+
is_convertible_v<decltype(declval<const _Tp&>() !=
1252+
declval<const _Up&>()), bool>,
12531253
bool
12541254
>
12551255
operator!=(const optional<_Tp>& __x, const _Up& __v)
@@ -1260,8 +1260,8 @@ operator!=(const optional<_Tp>& __x, const _Up& __v)
12601260
template <class _Tp, class _Up>
12611261
_LIBCPP_INLINE_VISIBILITY constexpr
12621262
_EnableIf<
1263-
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() !=
1264-
_VSTD::declval<const _Up&>()), bool>,
1263+
is_convertible_v<decltype(declval<const _Tp&>() !=
1264+
declval<const _Up&>()), bool>,
12651265
bool
12661266
>
12671267
operator!=(const _Tp& __v, const optional<_Up>& __x)
@@ -1272,8 +1272,8 @@ operator!=(const _Tp& __v, const optional<_Up>& __x)
12721272
template <class _Tp, class _Up>
12731273
_LIBCPP_INLINE_VISIBILITY constexpr
12741274
_EnableIf<
1275-
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() <
1276-
_VSTD::declval<const _Up&>()), bool>,
1275+
is_convertible_v<decltype(declval<const _Tp&>() <
1276+
declval<const _Up&>()), bool>,
12771277
bool
12781278
>
12791279
operator<(const optional<_Tp>& __x, const _Up& __v)
@@ -1284,8 +1284,8 @@ operator<(const optional<_Tp>& __x, const _Up& __v)
12841284
template <class _Tp, class _Up>
12851285
_LIBCPP_INLINE_VISIBILITY constexpr
12861286
_EnableIf<
1287-
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() <
1288-
_VSTD::declval<const _Up&>()), bool>,
1287+
is_convertible_v<decltype(declval<const _Tp&>() <
1288+
declval<const _Up&>()), bool>,
12891289
bool
12901290
>
12911291
operator<(const _Tp& __v, const optional<_Up>& __x)
@@ -1296,8 +1296,8 @@ operator<(const _Tp& __v, const optional<_Up>& __x)
12961296
template <class _Tp, class _Up>
12971297
_LIBCPP_INLINE_VISIBILITY constexpr
12981298
_EnableIf<
1299-
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() <=
1300-
_VSTD::declval<const _Up&>()), bool>,
1299+
is_convertible_v<decltype(declval<const _Tp&>() <=
1300+
declval<const _Up&>()), bool>,
13011301
bool
13021302
>
13031303
operator<=(const optional<_Tp>& __x, const _Up& __v)
@@ -1308,8 +1308,8 @@ operator<=(const optional<_Tp>& __x, const _Up& __v)
13081308
template <class _Tp, class _Up>
13091309
_LIBCPP_INLINE_VISIBILITY constexpr
13101310
_EnableIf<
1311-
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() <=
1312-
_VSTD::declval<const _Up&>()), bool>,
1311+
is_convertible_v<decltype(declval<const _Tp&>() <=
1312+
declval<const _Up&>()), bool>,
13131313
bool
13141314
>
13151315
operator<=(const _Tp& __v, const optional<_Up>& __x)
@@ -1320,8 +1320,8 @@ operator<=(const _Tp& __v, const optional<_Up>& __x)
13201320
template <class _Tp, class _Up>
13211321
_LIBCPP_INLINE_VISIBILITY constexpr
13221322
_EnableIf<
1323-
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() >
1324-
_VSTD::declval<const _Up&>()), bool>,
1323+
is_convertible_v<decltype(declval<const _Tp&>() >
1324+
declval<const _Up&>()), bool>,
13251325
bool
13261326
>
13271327
operator>(const optional<_Tp>& __x, const _Up& __v)
@@ -1332,8 +1332,8 @@ operator>(const optional<_Tp>& __x, const _Up& __v)
13321332
template <class _Tp, class _Up>
13331333
_LIBCPP_INLINE_VISIBILITY constexpr
13341334
_EnableIf<
1335-
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() >
1336-
_VSTD::declval<const _Up&>()), bool>,
1335+
is_convertible_v<decltype(declval<const _Tp&>() >
1336+
declval<const _Up&>()), bool>,
13371337
bool
13381338
>
13391339
operator>(const _Tp& __v, const optional<_Up>& __x)
@@ -1344,8 +1344,8 @@ operator>(const _Tp& __v, const optional<_Up>& __x)
13441344
template <class _Tp, class _Up>
13451345
_LIBCPP_INLINE_VISIBILITY constexpr
13461346
_EnableIf<
1347-
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() >=
1348-
_VSTD::declval<const _Up&>()), bool>,
1347+
is_convertible_v<decltype(declval<const _Tp&>() >=
1348+
declval<const _Up&>()), bool>,
13491349
bool
13501350
>
13511351
operator>=(const optional<_Tp>& __x, const _Up& __v)
@@ -1356,8 +1356,8 @@ operator>=(const optional<_Tp>& __x, const _Up& __v)
13561356
template <class _Tp, class _Up>
13571357
_LIBCPP_INLINE_VISIBILITY constexpr
13581358
_EnableIf<
1359-
is_convertible_v<decltype(_VSTD::declval<const _Tp&>() >=
1360-
_VSTD::declval<const _Up&>()), bool>,
1359+
is_convertible_v<decltype(declval<const _Tp&>() >=
1360+
declval<const _Up&>()), bool>,
13611361
bool
13621362
>
13631363
operator>=(const _Tp& __v, const optional<_Up>& __x)

libcxx/include/ostream

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,7 @@ struct __is_ostreamable : false_type { };
10321032

10331033
template <class _Stream, class _Tp>
10341034
struct __is_ostreamable<_Stream, _Tp, decltype(
1035-
_VSTD::declval<_Stream>() << _VSTD::declval<_Tp>(), void()
1035+
declval<_Stream>() << declval<_Tp>(), void()
10361036
)> : true_type { };
10371037

10381038
template <class _Stream, class _Tp, class = typename enable_if<

libcxx/include/scoped_allocator

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ struct __outermost<_Alloc, true>
375375
{
376376
typedef typename remove_reference
377377
<
378-
decltype(_VSTD::declval<_Alloc>().outer_allocator())
378+
decltype(declval<_Alloc>().outer_allocator())
379379
>::type _OuterAlloc;
380380
typedef typename __outermost<_OuterAlloc>::type type;
381381
_LIBCPP_INLINE_VISIBILITY

0 commit comments

Comments
 (0)