Skip to content

Commit

Permalink
update stl/inc/xtr1common: _Is_any_of_v (#3933)
Browse files Browse the repository at this point in the history
  • Loading branch information
GoodenoughPhysicsLab committed Aug 11, 2023
1 parent 5c3a8a5 commit 094e533
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions stl/inc/xtr1common
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,11 @@ _INLINE_VAR constexpr bool disjunction_v = disjunction<_Traits...>::value;

template <class _Ty, class... _Types>
_INLINE_VAR constexpr bool _Is_any_of_v = // true if and only if _Ty is in _Types
#if _HAS_CXX17
(is_same_v<_Ty, _Types> || ...);
#else // ^^^ _HAS_CXX17 / !_HAS_CXX17 vvv
disjunction_v<is_same<_Ty, _Types>...>;
#endif // _HAS_CXX17

_NODISCARD constexpr bool _Is_constant_evaluated() noexcept { // Internal function for any standard mode
return __builtin_is_constant_evaluated();
Expand Down

0 comments on commit 094e533

Please sign in to comment.