| 45 | null_sentinal_t end() const { return {}; } |
| 46 | }; |
| 47 | int main() { |
| 48 | |
| 49 | for( char c : str_view<char>{"hello world\n"} ) |
| 50 | { |
| 51 | std::cout << c; |
| 52 | } |
| 53 | |
| 54 | #if 0 |
| 55 | auto&& range = str_view<char>{"hello world\n"}; |
| 56 | using std::begin; using std::end; |
| 57 | auto start = range.begin(); |
| 58 | auto finish = range.end(); |
| 59 | for( ; start != finish; ++start ) |
| 60 | { |
| 61 | char c=*start; |
| 62 | std::cout << c; |
| 63 | } |
| 64 | #endif |
| 65 | } |