Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update stl/inc/xtr1common: _Is_any_of_v #3933

Merged
merged 2 commits into from
Aug 11, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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