Debian Codegraph @

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

raw
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
7 template <class CharT, std::size_t N>
8 auto make_string(const char (&in)[N]) {
9 return std::basic_string<CharT>(in + 0, in + (N - 1));
10 }
11
12 template <class CharT, std::size_t N>
13 auto 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