| 169 | // Returns true if enum-flags contains value with such value. |
| 170 | template <typename E> |
| 171 | [[nodiscard]] constexpr auto enum_flags_contains(E value) noexcept -> detail::enable_if_t<E, bool> { |
| 172 | using D = std::decay_t<E>; |
| 173 | using U = underlying_type_t<D>; |
| 174 | |
| 175 | return static_cast<bool>(enum_flags_cast<D>(static_cast<U>(value))); |
| 176 | } |
| 177 | |
| 178 | // Returns true if enum-flags contains value with such integer value. |
| 179 | template <typename E> |