diff --git a/AK/GenericShorthands.h b/AK/GenericShorthands.h index 73941857dfb..c2fd328a3d8 100644 --- a/AK/GenericShorthands.h +++ b/AK/GenericShorthands.h @@ -11,55 +11,55 @@ namespace AK { template -[[nodiscard]] bool first_is_one_of(T const to_compare, Ts const... valid_values) +[[nodiscard]] constexpr bool first_is_one_of(T const to_compare, Ts const... valid_values) { return (... || (to_compare == valid_values)); } template -[[nodiscard]] bool first_is_smaller_than_one_of(T const to_compare, Ts const... valid_values) +[[nodiscard]] constexpr bool first_is_smaller_than_one_of(T const to_compare, Ts const... valid_values) { return (... || (to_compare < valid_values)); } template -[[nodiscard]] bool first_is_smaller_or_equal_than_one_of(T const to_compare, Ts const... valid_values) +[[nodiscard]] constexpr bool first_is_smaller_or_equal_than_one_of(T const to_compare, Ts const... valid_values) { return (... || (to_compare <= valid_values)); } template -[[nodiscard]] bool first_is_larger_than_one_of(T const to_compare, Ts const... valid_values) +[[nodiscard]] constexpr bool first_is_larger_than_one_of(T const to_compare, Ts const... valid_values) { return (... || (to_compare > valid_values)); } template -[[nodiscard]] bool first_is_larger_or_equal_than_one_of(T const to_compare, Ts const... valid_values) +[[nodiscard]] constexpr bool first_is_larger_or_equal_than_one_of(T const to_compare, Ts const... valid_values) { return (... || (to_compare >= valid_values)); } template -[[nodiscard]] bool first_is_smaller_than_all_of(T const to_compare, Ts const... valid_values) +[[nodiscard]] constexpr bool first_is_smaller_than_all_of(T const to_compare, Ts const... valid_values) { return (... && (to_compare < valid_values)); } template -[[nodiscard]] bool first_is_smaller_or_equal_than_all_of(T const to_compare, Ts const... valid_values) +[[nodiscard]] constexpr bool first_is_smaller_or_equal_than_all_of(T const to_compare, Ts const... valid_values) { return (... && (to_compare <= valid_values)); } template -[[nodiscard]] bool first_is_larger_than_all_of(T const to_compare, Ts const... valid_values) +[[nodiscard]] constexpr bool first_is_larger_than_all_of(T const to_compare, Ts const... valid_values) { return (... && (to_compare > valid_values)); } template -[[nodiscard]] bool first_is_larger_or_equal_than_all_of(T const to_compare, Ts const... valid_values) +[[nodiscard]] constexpr bool first_is_larger_or_equal_than_all_of(T const to_compare, Ts const... valid_values) { return (... && (to_compare >= valid_values)); }