
25 Sep
2025
25 Sep
'25
4:58 p.m.
On Thu, Sep 25, 2025, at 8:33 AM, Mohammad Nejati via Boost wrote:
Wouldn't adding an array constructor resolve the problem? template <size_t N> cstring_view(const char (&str)[N]);
Yes, but `cstring_view("Hello\0World!")` would not do the right thing¹. https://godbolt.org/z/GMjzb4eEe ¹ (without metaprogramming hacks which might not always be available. Also do we really want this to be a header that shows up in compilation profiles :))