1#ifndef TEST_STD_RANGES_RANGE_FACTORIES_RANGE_ISTREAM_UTILS_H
2#define TEST_STD_RANGES_RANGE_FACTORIES_RANGE_ISTREAM_UTILS_H
3
4#include <sstream>
5#include <string>
6
7template <class CharT, std::size_t N>
8auto make_string(const char (&in)[N]) {
9 return std::basic_string<CharT>(in + 0, in + (N - 1));
10}
11
12template <class CharT, std::size_t N>
13auto make_string_stream(const char (&in)[N]) {
14 return std::basic_istringstream<CharT>(make_string<CharT>(in));
15}
16
17#endif //TEST_STD_RANGES_RANGE_FACTORIES_RANGE_ISTREAM_UTILS_H
18

source code of libcxx/test/std/ranges/range.factories/range.istream.view/utils.h