|
using | value_type = typename decltype(GetArray())::value_type |
|
|
static constexpr auto | value |
|
◆ value
template<auto GetArray, auto Predicate>
Initial value:= [] {
constexpr auto array = GetArray();
constexpr auto actual_size = std::count_if(array.begin(), array.end(), Predicate);
std::size_t index{};
std::array<value_type, actual_size> result{};
for (auto&& item : array) {
if (Predicate(item)) {
result[index++] = item;
}
}
return result;
}()
The documentation for this struct was generated from the following file: