32 template<
typename T1,
typename T2>
33 inline constexpr
bool decayed_is_same = std::is_same_v<std::decay_t<T1>, std::decay_t<T2>>;
48 template<
typename Container,
typename Value>
51 static bool eval(
const Container& container,
const Value& value)
53 typename Container::const_iterator end = container.end();
54 return std::find(container.begin(), end, value) != end;
63 template<
typename Container>
66 static bool eval(
const Container& container,
const typename Container::key_type& value)
68 return container.find(value) != container.end();
82 template<
typename Container,
typename Value>
83 inline bool contains(
const Container& container,
const Value& value)
102 template<
typename Container,
typename Predicate>
103 void erase_if(Container& container,
const Predicate& predicate)
105 container.erase(std::remove_if(container.begin(), container.end(), predicate), container.end());
112 template<
typename Container,
typename Predicate>
113 void sort_if(Container& container,
const Predicate& predicate)
115 std::sort(container.begin(), container.end(), predicate);
constexpr bool decayed_is_same
Equivalent to as std::is_same_v except both types are passed through std::decay first.
bool contains(const Container &container, const Value &value)
Returns true iff value is found in container.
std::string get_unknown_exception_type()
Utility function for finding the type of thing caught with catch(...).
bool chars_equal_insensitive(char a, char b)
void erase_if(Container &container, const Predicate &predicate)
Convenience wrapper for using std::remove_if on a container.
constexpr bool dependent_false_v
Workaround for the fact that static_assert(false) is invalid.
bool chars_less_insensitive(char a, char b)
void sort_if(Container &container, const Predicate &predicate)
Convenience wrapper for using std::sort on a container.
static bool eval(const Container &container, const typename Container::key_type &value)
A struct that exists to implement a generic wrapper for std::find.
static bool eval(const Container &container, const Value &value)