<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 8 Jul 2020 at 18:54, Tom Honermann &lt;<a href="mailto:tom@honermann.net">tom@honermann.net</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">
  
    
  
  <div>
    <div>On 7/8/20 12:22 PM, Corentin Jabot via
      SG16 wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div dir="ltr"><br>
        </div>
        <br>
        <div class="gmail_quote">
          <div dir="ltr" class="gmail_attr">On Wed, 8 Jul 2020 at 18:07,
            Tom Honermann &lt;<a href="mailto:tom@honermann.net" target="_blank">tom@honermann.net</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">
            <div>
              <div>On 7/8/20 8:45 AM, Corentin Jabot wrote:<br>
              </div>
              <blockquote type="cite">
                <div dir="ltr">
                  <div dir="ltr"><br>
                  </div>
                  <br>
                  <div class="gmail_quote">
                    <div dir="ltr" class="gmail_attr">On Wed, 8 Jul 2020
                      at 13:56, Alisdair Meredith &lt;<a href="mailto:alisdairm@me.com" target="_blank">alisdairm@me.com</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">
                      <div>Well, u8”” L”” is portably ill-formed, and
                        should be diagnosed :)
                        <div><br>
                        </div>
                        <div>The corner cases that are conditionally
                          supported with an</div>
                        <div>implementation defined value are:</div>
                        <div><br>
                        </div>
                        <div>  u8”” u”&quot;</div>
                        <div>  u8”” U””</div>
                        <div>  u”” u8””</div>
                        <div>  u”” U””</div>
                        <div>  u&quot;” L””</div>
                        <div>  U”” u8””</div>
                        <div>  U”” u””</div>
                        <div>  U”” L””</div>
                        <div>  L”” u””</div>
                        <div>  L”” U”&quot;<br>
                        </div>
                      </div>
                    </blockquote>
                    <div><br>
                    </div>
                    <div>Let&#39;s entertain that this should, for some
                      reason, not be ill-formed.</div>
                    <div>What should it do?</div>
                    <div>Can you find a set of rules that people will
                      not trip over?</div>
                    <div>Is it like rock paper scissors but with u8, u
                      and U instead?</div>
                  </div>
                </div>
              </blockquote>
              <p>I can sort-of kind-of see a use case for allowing one
                of u&quot;&quot; or U&quot;&quot; to be concatenated with L&quot;&quot; as a
                conditionally-supported feature when the wide execution
                encoding is a match (UTF-16 for u&quot;&quot; or UTF-32 for U&quot;&quot;). 
                This might be useful in strange situations where string
                concatenation is desired and one of the components is
                provided by a macro expansion.  The question then is
                what the type of the string literal is.  The only model
                I can see working there is to adopt the type from the
                first component and ignore the encoding-prefix from the
                remaining ones.</p>
              <p>I would not be heart broken over breaking code that
                does this.<br>
              </p>
              <blockquote type="cite">
                <div dir="ltr">
                  <div class="gmail_quote">
                    <div><br>
                    </div>
                    <div>I understand that we can make _anything_
                      well-formed or conditionally supported.</div>
                    <div>We should ask ourselves why?</div>
                    <div>Is there a reason to allow that, which
                      surpasses the cost of the added complexity?</div>
                    <div>We can ( and I believe we should) make that
                      ill-formed.</div>
                    <div>(Implementations sensibly do not support these
                      things anyway)</div>
                  </div>
                </div>
              </blockquote>
              <p>Can you summarize what implementations do today?  I
                haven&#39;t researched.</p>
            </div>
          </blockquote>
          <div>They do not support the combinations not mandated by the
            standard</div>
        </div>
      </div>
    </blockquote>
    <p>Which implementations did you check?  Clang, gcc, MSVC, and icc?<br></p></div></blockquote><div><br></div><div>yes <a href="https://compiler-explorer.com/z/4NDo-4">https://compiler-explorer.com/z/4NDo-4</a></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><p>
    </p>
    <p>Tom.<br>
    </p>
    <blockquote type="cite">
      <div dir="ltr">
        <div class="gmail_quote">
          <div> </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
            <div>
              <blockquote type="cite">
                <div dir="ltr">
                  <div class="gmail_quote">
                    <div><br>
                    </div>
                    <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                      <div>
                        <div>
                          <div><br>
                          </div>
                          <div>I would like all of the combinations that
                            do not involve L”” to have a</div>
                          <div>well defined value, whether or not we
                            specify the encoding.</div>
                        </div>
                      </div>
                    </blockquote>
                  </div>
                </div>
              </blockquote>
              <p>Well-defined or perhaps ill-formed?</p>
              <p>This is another case where I think the feature makes
                little or no sense, but, unless shown otherwise, doesn&#39;t
                cause problems in practice and should therefore be
                treated as a low priority issue relative to other things
                we could be working on.</p>
              <blockquote type="cite">
                <div dir="ltr">
                  <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>
                        <div>
                          <div><br>
                          </div>
                          <div>I do not care to further constrain the
                            L”” forms at this point.</div>
                        </div>
                      </div>
                    </blockquote>
                  </div>
                </div>
              </blockquote>
              <p>+1.</p>
              <p>Tom.<br>
              </p>
              <blockquote type="cite">
                <div dir="ltr">
                  <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>
                        <div>
                          <div><br>
                          </div>
                          <div>AlisdairM</div>
                          <div><br>
                          </div>
                          <div><br>
                          </div>
                          <div>
                            <blockquote type="cite">
                              <div>On Jul 8, 2020, at 12:35, Corentin
                                Jabot &lt;<a href="mailto:corentinjabot@gmail.com" target="_blank">corentinjabot@gmail.com</a>&gt;
                                wrote:</div>
                              <br>
                              <div><br>
                                <br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
                                <div class="gmail_quote" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
                                  <div dir="ltr" class="gmail_attr">On
                                    Wed, 8 Jul 2020 at 13:09, Alisdair
                                    Meredith via SG16 &lt;<a href="mailto:sg16@lists.isocpp.org" target="_blank">sg16@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">After
                                    taking another look over P2029
                                    resolving a few core issues,<br>
                                    I am further concerned by
                                    [lex.string]p11, which states (among<br>
                                    other things) that concatenation of
                                    unicode string literals with<br>
                                    different encoding-prefixes is
                                    conditionally supported with<br>
                                    implementation-defined behavior. 
                                    That seems a little to free for<br>
                                    my tastes.<br>
                                  </blockquote>
                                  <div><br>
                                  </div>
                                  <div>+1 </div>
                                  <div> </div>
                                  <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I
                                    can buy conditionally supported,
                                    although see no harm in<br>
                                    requiring it for any combination of
                                    unicode encoding prefixes.<br>
                                    I am concerned about the
                                    implementation-defined behavior:<br>
                                    the end result should be the result
                                    of concatenating the<br>
                                    transcoded representation of each of
                                    the strings into a common<br>
                                    encoding, corresponding to one of
                                    the involved encoding<br>
                                    prefixes.  I am happy to defer to
                                    implementations to choose<br>
                                    between UTF8/16/32, or we could
                                    define a canonical prefered<br>
                                    ordering among those choices.<br>
                                    <br>
                                    Does this seem worth calling out
                                    (yet another SG16 paper) or<br>
                                    better left alone, as we already
                                    have way too much busy work<br>
                                    on this groups plate, and
                                    implementation will most likely do
                                    the<br>
                                    right thing anyway?<br>
                                  </blockquote>
                                  <div><br>
                                  </div>
                                  <div>It&#39;s called out in P2178</div>
                                  <div><br>
                                  </div>
                                  <div>from a user perspective, we allow
                                    to manything for any mental model to
                                    work</div>
                                  <div><br>
                                  </div>
                                  <div>u8&quot;&quot; &quot;&quot; and &quot;&quot; u8&quot;&quot; are both 
                                    utf-8 strings</div>
                                  <div><br>
                                  </div>
                                  <div>what<br>
                                  </div>
                                  <div><br>
                                  </div>
                                  <div>u8&quot;&quot; L&quot;&quot; </div>
                                  <div><br>
                                  </div>
                                  <div>is supposed to be? utf-8?  wide?
                                    How can I tell ? and it&#39;s not
                                    portable?</div>
                                  <div><br>
                                  </div>
                                  <div>There are only 2 models that make
                                    sense imo</div>
                                  <div>Either</div>
                                  <div>- Only the first string can have
                                    a prefix</div>
                                  <div>- Only one of the string can have
                                    a prefix</div>
                                  <div><br>
                                  </div>
                                  <div>Note that, despite the terribly
                                    misleading wording the strings that
                                    are concatenated do *not* have an
                                    associated encoding before
                                    concatenation,</div>
                                  <div>the compiler choses a prefix
                                    after concatenation (this is yet
                                    something needing fixing, i think
                                    tom started a thread a few days ago
                                    back)</div>
                                  <div><br>
                                  </div>
                                  <div>u8&quot;&quot; L&quot;&quot;  is not utf-8 + wide
                                    (what would that mean?) but a string
                                    interpreted as either utf-8 or wide
                                    depending on the whims of the
                                    implementation.</div>
                                  <div><br>
                                  </div>
                                  <div>I think it needs fixing indeed :)</div>
                                  <div> </div>
                                  <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
                                    (I am not overly concerned about
                                    specifying concatenation for<br>
                                    narrow/wide string literals with
                                    unicode string literals, which<br>
                                    can remain conditionally supported
                                    with implementation-defined<br>
                                    values.)<br>
                                    <br>
                                    AlisdairM<br>
                                    --<span> </span><br>
                                    SG16 mailing list<br>
                                    <a href="mailto:SG16@lists.isocpp.org" target="_blank">SG16@lists.isocpp.org</a><br>
                                    <a href="https://lists.isocpp.org/mailman/listinfo.cgi/sg16" rel="noreferrer" target="_blank">https://lists.isocpp.org/mailman/listinfo.cgi/sg16</a></blockquote>
                                </div>
                              </div>
                            </blockquote>
                          </div>
                          <br>
                        </div>
                      </div>
                    </blockquote>
                  </div>
                </div>
              </blockquote>
              <p><br>
              </p>
            </div>
          </blockquote>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
    </blockquote>
    <p><br>
    </p>
  </div>

</blockquote></div></div>

