15namespace hi::inline
v1 {
17template<
typename Value,
typename Range>
18[[nodiscard]]
constexpr Value get_first(Range &&range)
20 auto it = std::ranges::begin(range);
21 auto last = std::ranges::end(range);
33template<
typename Range>
34[[nodiscard]]
constexpr Range::value_type get_first(Range&& range)
36 return get_first<typename Range::value_type>(std::forward<Range>(range));
42template<
typename Value,
typename Range>
45 auto first = std::ranges::begin(range);
46 auto last = std::ranges::end(range);
57 }
else if constexpr (
requires { Value{std::string_view{(*first).begin(), (*first).end()}}; }) {
63 for (
auto it = first; it != last; ++it) {
64 r.emplace_back(std::string_view{(*it).begin(), (*it).end()});
75template<
typename Range>
78 return make_vector<typename Range::value_type>(std::forward<Range>(range));
Utilities to assert and bound check.
#define hi_static_not_implemented()
This part of the code has not been implemented yet.
Definition assert.hpp:187
DOXYGEN BUG.
Definition algorithm.hpp:15
constexpr std::vector< Value > make_vector(Range &&range)
Make a vector from a view.
Definition ranges.hpp:43
T back_inserter(T... args)