<div dir="ltr">@Erik, Thanks for digging through the history!<div><br></div><div>I still look forward to removing it after moving the SFINAE into the template parameter list.</div><div><br></div><div>/Eric</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 5, 2018 at 2:07 PM, Erik Pilkington <span dir="ltr"><<a href="mailto:erik.pilkington@gmail.com" target="_blank">erik.pilkington@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>Looks like the initial purpose was to implement a poor man's
explicit operator bool that returned a pointer to member, but it
was removed in r151088.</p><div><div class="h5">
<br>
<div class="m_-4368940771886650612moz-cite-prefix">On 2018-06-05 3:57 PM, Eric Fiselier
via cfe-dev wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">I'm not sure what the purpose is. I agree it
doesn't seem to have any effect, and the git blame comes back to
the initial commit for libc++.
<div>Changing the layout of `__nat` now would be an ABI break;
so that's out of the question. But I have some upcoming
patches that are going</div>
<div>to remove most usages of it.</div>
<div><br>
</div>
<div>@Howard, do you recall what the purpose of this was?
Something to do with initializing empty structs maybe?</div>
<div><br>
</div>
<div>/Eric</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Jun 5, 2018 at 2:11 AM, Li,
Zeyang via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<p>I
was looking through clang's c++ standard library, and
found this class in the shared_ptr class.</p>
<pre style="margin:0px 0px 1em;padding:5px;border:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-weight:400;font-stretch:inherit;line-height:inherit;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;font-size:13px;vertical-align:baseline;box-sizing:inherit;width:auto;max-height:600px;overflow:auto;background-color:rgb(239,240,241);word-wrap:normal;color:rgb(36,39,41);letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;font-size:13px;vertical-align:baseline;box-sizing:inherit;background-color:rgb(239,240,241);white-space:inherit">class shared_ptr
...
private:
struct __nat {int __for_bool_;};
...
};
</code></pre>
<p>and
I understand that this class is used to detect whether
type conversion is possible at compile time, but its
member __for_bool_ is never used anywhere in the class
or the weak_ptr counterpart. So my question is, what is
the point of __for_bool_, why not simply use an empty
class for the same purpose?</p>
<p>I'm
sure the standard library authors definitely knows
better than me. Please help.</p>
<p>Thanks,<br>
Zeyang</p>
</div>
<br>
______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="m_-4368940771886650612mimeAttachmentHeader"></fieldset>
<br>
<pre>______________________________<wbr>_________________
cfe-dev mailing list
<a class="m_-4368940771886650612moz-txt-link-abbreviated" href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>
<a class="m_-4368940771886650612moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a>
</pre>
</blockquote>
<br>
</div></div></div>
</blockquote></div><br></div>