33 template<
typename T1,
typename T2>
34 inline constexpr
bool decayed_is_same = std::is_same_v<std::decay_t<T1>, std::decay_t<T2>>;
49 template<
typename Container,
typename Value>
52 static bool eval(
const Container& container,
const Value& value)
54 typename Container::const_iterator end = container.end();
55 return std::find(container.begin(), end, value) != end;
64 template<
typename Container>
67 static bool eval(
const Container& container,
const typename Container::key_type& value)
69 return container.find(value) != container.end();
83 template<
typename Container,
typename Value>
84 inline bool contains(
const Container& container,
const Value& value)
103 template<
typename Container,
typename Predicate>
104 void erase_if(Container& container,
const Predicate& predicate)
106 container.erase(std::remove_if(container.begin(), container.end(), predicate), container.end());
113 template<
typename Container,
typename Predicate>
114 void sort_if(Container& container,
const Predicate& predicate)
116 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)