<div dir="ltr">If we have a macro and a UDL, is there any risk of any of these issues anyway?  We could hide the UDL under a details namespace and expose a macro that "just works".<div><br></div><div>But that begs the question -- is there any way to invoke a UDL that is not visible in the current namespace?  can you explicitly qualify it?  </div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Nov 29, 2016 at 9:56 AM David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg">Honestly, if we just use something like that macro - we could define it in-situ for each table separately. Then there's less risk of any interesting cases like large buffers, embedded nulls, etc. (it's limited in scope and obvious at the use what the limitations of the macro are, etc)</div><br class="gmail_msg"><div class="gmail_quote gmail_msg"><div dir="ltr" class="gmail_msg">On Tue, Nov 29, 2016 at 9:55 AM Zachary Turner <<a href="mailto:zturner@google.com" class="gmail_msg" target="_blank">zturner@google.com</a>> wrote:<br class="gmail_msg"></div><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_msg">char buffer[100];</div>And it also allows LIT(buffer) to compile, whereas the UDL doesn't.</div><br class="gmail_msg"><div class="gmail_quote gmail_msg"><div dir="ltr" class="gmail_msg">On Tue, Nov 29, 2016 at 9:54 AM Mehdi Amini <<a href="mailto:mehdi.amini@apple.com" class="gmail_msg" target="_blank">mehdi.amini@apple.com</a>> wrote:<br class="gmail_msg"></div><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br class="gmail_msg">
> On Nov 29, 2016, at 9:52 AM, Malcolm Parsons <<a href="mailto:malcolm.parsons@gmail.com" class="gmail_msg" target="_blank">malcolm.parsons@gmail.com</a>> wrote:<br class="gmail_msg">
><br class="gmail_msg">
> On 29 November 2016 at 17:38, Zachary Turner <<a href="mailto:zturner@google.com" class="gmail_msg" target="_blank">zturner@google.com</a>> wrote:<br class="gmail_msg">
>> I see, but I looked over your proposed implementation from earlier in the<br class="gmail_msg">
>> thread, and if I'm not mistaken I see this:<br class="gmail_msg">
><br class="gmail_msg">
> That's a different suggestion.<br class="gmail_msg">
><br class="gmail_msg">
>> That said, what did you think about my other proposal of the complicated UDL<br class="gmail_msg">
>> with macro?<br class="gmail_msg">
>><br class="gmail_msg">
>> #define LIT(x) x_string_ref_literal<br class="gmail_msg">
>> constexpr StringRef Strings[] = {LIT("a"), LIT("b"), LIT("c")};<br class="gmail_msg">
><br class="gmail_msg">
> Why bother with the UDL?<br class="gmail_msg">
> #define LIT(x) StringRef((x), sizeof(x)-1)<br class="gmail_msg">
><br class="gmail_msg">
<br class="gmail_msg">
There is subtlety though, it changes the result for: LIT(“hello\0world”).<br class="gmail_msg">
<br class="gmail_msg">
—<br class="gmail_msg">
Mehdi<br class="gmail_msg">
<br class="gmail_msg">
</blockquote></div>
</blockquote></div>
</blockquote></div>