<div dir="ltr"><div dir="ltr">On Wed, Nov 6, 2019 at 8:23 PM Corentin Jabot &lt;<a href="mailto:corentinjabot@gmail.com">corentinjabot@gmail.com</a>&gt; wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hey. </div><div><br></div><div dir="ltr">Agreed, it&#39;s a byte thing - actually, have you considered std::byte ?</div><div>You showed that it is trivial to programmatically add a null terminator, which seems sufficient to cover all use cases</div><div><br></div></div></blockquote><div><br></div><div>It is not exactly trivial for #embed or #embed_str. #embed generates a brace-delimeted list of the bytes. It&#39;s as if the contents are directly replaced by:<br><br>     <span style="font-family:monospace">{ 102, 111, 111

}</span><br></div><div> </div>     You cannot &quot;just append&quot; a null terminator in there, so it would require a copy. If that&#39;s okay (copying things), then we can throw #embed_str out the window. As far as requiring bytes, you would need to generate a brace-delimeted list with all of the entries cast to the right type, because each of those entries is not trivially convertible to a std::byte: <a href="https://godbolt.org/z/NRkSfK">https://godbolt.org/z/NRkSfK</a><br><br></div><div class="gmail_quote">     There was mention in EWG for<span style="font-family:monospace"> #embed TYPE<font size="1">(optional)</font> LIMIT<font size="1">(optional)</font> <i>h-char-sequence</i></span>, where you could pick the type of the brace-delimited list that comes out rather than letting it get converted down implicitly. Maybe that&#39;s the solution we need, for std::byte?<br><br></div><div class="gmail_quote">Sincerely,<br></div><div class="gmail_quote">JeanHeyd<br></div></div>