<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 18, 2016, at 14:52, Chandler Carruth <<a href="mailto:chandlerc@gmail.com" class="">chandlerc@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_quote"><div dir="ltr" class="">On Thu, Feb 18, 2016 at 2:50 PM Jordan Rose via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div style="word-wrap: break-word;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Feb 18, 2016, at 14:48, Chandler Carruth <<a href="mailto:chandlerc@gmail.com" target="_blank" class="">chandlerc@gmail.com</a>> wrote:</div><br class=""><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div dir="ltr" class="">On Thu, Feb 18, 2016 at 2:07 PM Jordan Rose via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank" class="">llvm-commits@lists.llvm.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">Author: jrose<br class="">Date: Thu Feb 18 16:03:23 2016<br class="">New Revision: 261268<br class=""><br class="">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=261268&view=rev" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project?rev=261268&view=rev</a><br class="">Log:<br class="">[ADT] Be less clever when using a nonce type for disambiguation.<br class=""><br class="">Old compilers don't like constexpr, but we're only going to use this in one<br class="">place anyway: this file. Everyone else should go through PointerLikeTypeTraits.<br class=""><br class="">Update to r261259.<br class=""><br class="">Modified:<br class="">   <span class="Apple-converted-space"> </span>llvm/trunk/include/llvm/ADT/PointerEmbeddedInt.h<br class=""><br class="">Modified: llvm/trunk/include/llvm/ADT/PointerEmbeddedInt.h<br class="">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/PointerEmbeddedInt.h?rev=261268&r1=261267&r2=261268&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/PointerEmbeddedInt.h?rev=261268&r1=261267&r2=261268&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/include/llvm/ADT/PointerEmbeddedInt.h (original)<br class="">+++ llvm/trunk/include/llvm/ADT/PointerEmbeddedInt.h Thu Feb 18 16:03:23 2016<br class="">@@ -45,7 +45,9 @@ class PointerEmbeddedInt {<br class="">     Mask = static_cast<uintptr_t>(-1) << Bits<br class="">   };<br class=""><br class="">-  static constexpr const struct RawValueTag {} RawValue = RawValueTag();<br class="">+  struct RawValueTag {<br class="">+    explicit RawValueTag() = default;<br class="">+  };<br class=""></blockquote><div class=""><br class=""></div><div class="">Why not just "struct RawValueTag {};"? Not sure what all the explicit stuff is buying you here...</div></div></div></div></blockquote><br class=""></div></div><div style="word-wrap: break-word;" class=""><div class="">I had that at first, but then thought about what happened last time: a particular collision of types that no one had thought to check. I wanted to make sure no one invoked the raw constructor with "PointerEmbeddedInt(rawValue, {})".</div></div></blockquote><div class=""><br class=""></div><div class="">It's a private type though, right? Anyways, just seems like a lot of code for a simple thing.</div></div></div></div></blockquote><br class=""></div><div>It's probably paranoia, but the private type doesn't protect anything.</div><div><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div><div>class Test {</div><div>  struct Private {};</div><div>  Test(int, Private) {}</div><div>public:</div><div>  struct Public {};</div><div>  Test(int, Public) {}</div><div>};</div><div><br class=""></div><div>auto test = Test(0, {});</div></div></blockquote><br class=""><div class="">Jordan</div></body></html>