<div dir="ltr"><div dir="ltr">On Wed, Jul 31, 2019 at 10:19 AM Lyberta &lt;<a href="mailto:lyberta@lyberta.net">lyberta@lyberta.net</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">&gt; The benefit is unsigned char already has char_traits support too.<br>
<br>
I&#39;m looking at [char.traits.specializations] and don&#39;t see it.<br></blockquote><div><br></div><div>It&#39;s not in the standard specifically, no, but no implementation is dumb enough to ban it. If you have a strong over unsigned char, you can then specialize char_traits for it by just doing<br><br></div><div>template &lt;&gt;<br></div><div>struct char_traits&lt;u8char&gt; : char_traits&lt;unsigned char&gt; {};<br></div><div> <br></div><div>This requires that there&#39;s an implicit conversion from u8char -&gt; unsigned char, which I would imagine is safe enough unless you really care about overload resolution. If overload resolution is a problem, I would suggest either biting the bullet of a full implementation, or throwing out the strong typedef altogether and just using &quot;unsigned char&quot; for your u8 type anyhow.<br><br></div><div>Sincerely,<br></div><div>ThePhD<br></div></div></div>