50 for (
size_t i = 0; i < N; ++i)
51 rhs[i] = rhs[i] || base_t::operator[](i);
59 for (
size_t i = 0; i < N; ++i)
60 ret[i] = !base_t::operator[](i);
78template <
char op,
typename condition_head_t,
typename... condition_ts>
89template <
typename condition_t>
90struct char_predicate_base;
103template <
typename condition_t>
105 requires std::predicate<std::remove_reference_t<condition_t>,
char>;
106 requires std::is_base_of_v<char_predicate_base<std::remove_cvref_t<condition_t>>,
144 requires (
sizeof...(condition_ts) >= 2)
145struct char_predicate_disjunction;
147template <
char_predicate condition_t>
148struct char_predicate_negator;
157template <
typename derived_t>
168 template <
char_predicate rhs_t>
185 template <std::
integral value_t>
187 requires (
sizeof(value_t) == 1)
189 return derived_t::data[
static_cast<unsigned char>(val)];
193 template <std::
integral value_t>
195 requires (
sizeof(value_t) != 1)
199 : (char_trait::eq_int_type(val, char_trait::eof())) ? derived_t::data[256]
210 return derived_t::msg;
226 requires (
sizeof...(condition_ts) >= 2)
230 static inline const std::string msg = detail::condition_message_v<
'|', condition_ts...>;
247template <
char_predicate condition_t>
274template <u
int8_t
interval_first, u
int8_t
interval_last>
275 requires (interval_first <= interval_last)
288 static constexpr data_t data = []()
constexpr
292 for (
size_t i = interval_first; i <= static_cast<size_t>(interval_last); ++i)
312 static_assert(char_v == EOF ||
static_cast<uint64_t
>(char_v) < 256,
"TODO");
331 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:38
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:48
constexpr constexpr_pseudo_bitset operator~() const noexcept
Return a new bitset with all bits flipped.
Definition: predicate_detail.hpp:56
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:29
An abstract CRTP base class for parse conditions to add logical disjunction and negation operator.
Definition: predicate_detail.hpp:159
constexpr auto operator||(rhs_t const &) const
Combines the result of two seqan3::detail::char_predicate via logical disjunction.
Definition: predicate_detail.hpp:169
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:161
std::string message() const
Returns the message representing this condition as std::string.
Definition: predicate_detail.hpp:208
constexpr bool operator()(value_t const val) const noexcept
Invokes the condition on val.
Definition: predicate_detail.hpp:186
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:194
constexpr auto operator!() const
Return a new condition with all bits flipped.
Definition: predicate_detail.hpp:175
Logical disjunction operator for parse conditions.
Definition: predicate_detail.hpp:228
static const std::string msg
The message representing the disjunction of the associated conditions.
Definition: predicate_detail.hpp:230
static constexpr data_t data
The look-up table that is used to evaluate the input.
Definition: predicate_detail.hpp:238
Logical not operator for a parse condition.
Definition: predicate_detail.hpp:249
static const std::string msg
The message representing the negation of the associated condition.
Definition: predicate_detail.hpp:251
static constexpr data_t data
The look-up table that is used to evaluate the input.
Definition: predicate_detail.hpp:259
Parse condition that checks if a given value is equal to char_v.
Definition: predicate_detail.hpp:311
static const std::string msg
The message representing this condition.
Definition: predicate_detail.hpp:315
static constexpr data_t data
The look-up table that is used to evaluate the input.
Definition: predicate_detail.hpp:324
Parse condition that checks if a given value is in the range of rng_beg and interval_last.
Definition: predicate_detail.hpp:277
Provides traits to inspect some information of a type, for example its name.