exptl
General C++20 library that complements the C++ Standard Library
algorithm/classify_dangling.cpp

This is an example of how the classify() function returns std::ranges::dangling when range is a temporary.

#include <array>
#include <exptl/algorithm>
#include <ranges>
#include <type_traits>
// true
static_assert(
std::is_same_v<std::ranges::range_value_t<decltype(exptl::classify(
0, std::array{[](int v) { return v; }}))>,
std::ranges::dangling>);
constexpr classify(T const value, In &&range)
Checks a value against a range of predicates and returns a vector of iterators to the satisfied predi...
Definition: algorithm.hpp:101