<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 18, 2022 at 12:29 PM Peter Dimov via SG7 &lt;<a href="mailto:sg7@lists.isocpp.org">sg7@lists.isocpp.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">&gt; But on the other hand, if you have a `char const*`, it&#39;s trivial to obtain a<br>
&gt; string_view from it, whereas the reverse... isn&#39;t.<br>
<br>
&lt;source&gt;:9:27: error: &#39;std::basic_string_view&lt;char&gt;&#39; is not a valid type for a template non-type parameter because it is not structural<br>
    9 | template&lt;std::string_view sv&gt; consteval auto to_charp()<br>
      |                           ^~<br>
<br>
Yeah :-(</blockquote><div><br></div><div>This is actually a good reason to return string and vector&lt;info&gt; instead of string_view/char const* and span&lt;info&gt;. The containers will be usable as non-type template parameters (eventually), but the views will never be, and while char const* could be it&#39;s also not as usable. <br></div><div><br></div><div>Barry<br></div></div></div>

