Skip to content

Commit deb9520

Browse files
[ADT] Simplify check_options with std::conjunction (NFC) (llvm#159509)
This patch replaces the recursion with std::conjunction for readability and brevity.
1 parent ab00172 commit deb9520

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

llvm/include/llvm/ADT/ilist_node_options.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,8 @@ struct is_valid_option<ilist_parent<ParentTy>> : std::true_type {};
145145
/// Check whether options are valid.
146146
///
147147
/// The conjunction of \a is_valid_option on each individual option.
148-
template <class... Options> struct check_options;
149-
template <> struct check_options<> : std::true_type {};
150-
template <class Option1, class... Options>
151-
struct check_options<Option1, Options...>
152-
: std::bool_constant<is_valid_option<Option1>::value &&
153-
check_options<Options...>::value> {};
148+
template <class... Options>
149+
struct check_options : std::conjunction<is_valid_option<Options>...> {};
154150

155151
/// Traits for options for \a ilist_node.
156152
///

0 commit comments

Comments
 (0)