48 for (
size_t i = 0; i < N; ++i)
49 rhs[i] = rhs[i] || base_t::operator[](i);
57 for (
size_t i = 0; i < N; ++i)
58 ret[i] = !base_t::operator[](i);
76template <
char op,
typename condition_head_t,
typename... condition_ts>
87template <
typename condition_t>
88struct char_predicate_base;
101template <
typename condition_t>
103 requires std::predicate<std::remove_reference_t<condition_t>,
char>;
104 requires std::is_base_of_v<char_predicate_base<std::remove_cvref_t<condition_t>>,
142 requires (
sizeof...(condition_ts) >= 2)
143struct char_predicate_disjunction;
145template <
char_predicate condition_t>
146struct char_predicate_negator;
155template <
typename derived_t>
166 template <
char_predicate rhs_t>
183 template <std::
integral value_t>
185 requires (
sizeof(value_t) == 1)
187 return derived_t::data[
static_cast<unsigned char>(val)];
191 template <std::
integral value_t>
193 requires (
sizeof(value_t) != 1)
208 static_assert(!std::same_as<char_value_t, void>,
"There is no valid character representation.");
211 : (char_trait::eq_int_type(val, char_trait::eof())) ? derived_t::data[256]
222 return derived_t::msg;
238 requires (
sizeof...(condition_ts) >= 2)
242 static inline const std::string msg = detail::condition_message_v<
'|', condition_ts...>;
259template <
char_predicate condition_t>
286template <u
int8_t
interval_first, u
int8_t
interval_last>
287 requires (interval_first <= interval_last)
300 static constexpr data_t data = []()
constexpr
304 for (
size_t i = interval_first; i <= static_cast<size_t>(interval_last); ++i)
323 static_assert(char_v == EOF ||
static_cast<uint64_t
>(char_v) < 256,
"TODO");
342 ret[
static_cast<uint8_t
>(char_v)] =
true;
Provides various type traits on generic types.
A data structure that implements a subset of std::bitset as constexpr.
Definition predicate_detail.hpp:36
constexpr constexpr_pseudo_bitset operator|(constexpr_pseudo_bitset rhs) const noexcept
Return a new bitset that is a logical disjunction of the two given ones.
Definition predicate_detail.hpp:46
constexpr constexpr_pseudo_bitset operator~() const noexcept
Return a new bitset with all bits flipped.
Definition predicate_detail.hpp:54
An internal concept to check if an object fulfills the requirements of a seqan3::detail::char_predica...
The internal SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26
An abstract CRTP base class for parse conditions to add logical disjunction and negation operator.
Definition predicate_detail.hpp:157
constexpr auto operator||(rhs_t const &) const
Combines the result of two seqan3::detail::char_predicate via logical disjunction.
Definition predicate_detail.hpp:167
constexpr_pseudo_bitset< 257 > data_t
Type of the data field; as soon as std::bitset is fully constexpr, use that instead!
Definition predicate_detail.hpp:159
std::string message() const
Returns the message representing this condition as std::string.
Definition predicate_detail.hpp:220
constexpr bool operator()(value_t const val) const noexcept
Invokes the condition on val.
Definition predicate_detail.hpp:184
constexpr bool operator()(value_t const val) const noexcept
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition predicate_detail.hpp:192
constexpr auto operator!() const
Return a new condition with all bits flipped.
Definition predicate_detail.hpp:173
Logical disjunction operator for parse conditions.
Definition predicate_detail.hpp:240
static const std::string msg
The message representing the disjunction of the associated conditions.
Definition predicate_detail.hpp:242
static constexpr data_t data
The look-up table that is used to evaluate the input.
Definition predicate_detail.hpp:250
Logical not operator for a parse condition.
Definition predicate_detail.hpp:261
static const std::string msg
The message representing the negation of the associated condition.
Definition predicate_detail.hpp:263
static constexpr data_t data
The look-up table that is used to evaluate the input.
Definition predicate_detail.hpp:271
Parse condition that checks if a given value is equal to char_v.
Definition predicate_detail.hpp:322
static const std::string msg
The message representing this condition.
Definition predicate_detail.hpp:326
static constexpr data_t data
The look-up table that is used to evaluate the input.
Definition predicate_detail.hpp:335
Parse condition that checks if a given value is in the range of rng_beg and interval_last.
Definition predicate_detail.hpp:289
Provides traits to inspect some information of a type, for example its name.
Provides concepts that do not have equivalents in C++20.