<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div>+libcxx-dev, which got dropped</div><div>+Bruno</div><div><br class=""><blockquote type="cite" class=""><div class="">On 2019 Jan  18, at 07:21, Olivier Giroux <<a href="mailto:OGiroux@nvidia.com" class="">OGiroux@nvidia.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class="">But you agree that it does, though, right?</span></div></div></div></blockquote><div><br class=""></div><div>Hmm.  To be concrete, this is what I was worried about:</div><div><br class=""></div></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div><div>#!/bin/bash<br class=""><br class="">run() { echo "$*" >&2; "$@" || exit 1; }<br class="">run mkdir -p quote<br class="">run cat </dev/null >quote/type_traits<br class="">run /usr/bin/printf "%s\n" \<br class="">    "#include <vector>" \<br class="">    "std::vector<int> g;" \<br class="">    > t.cpp<br class="">run clang -iquote quote -fsyntax-only t.cpp<br class=""></div></div></blockquote><div class=""><br class=""></div>which should give this output:<br class=""><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class="">$ bash t.sh <br class="">mkdir -p quote<br class="">cat<br class="">/usr/bin/printf %s\n #include <vector> std::vector<int> g;<br class="">clang -iquote quote -fsyntax-only t.cpp<br class=""></div></blockquote><div class=""><br class=""></div><div class="">(i.e., no errors)</div><div class=""><br class=""></div>I thought if we switched to quoted "type_traits" everywhere I'd see a spew of errors.  However, I'd forgotten that quoted includes check relative to the includer *first*, before hitting the search paths.  So I was wrong here and this testcase doesn't expose a problem with your suggestion.<div class=""><br class=""></div><div class="">One other concern I have is that the funny #include_next dance between libc++ headers, clang headers, and libc (especially on Darwin-derived SDKs) continues work for modules.  I kind of doubt your idea would cause a problem there since libc++ should be the outer most layer, but it's pretty subtle and I'd want to be sure.  Bruno might be able to check that out for you if you make a patch.</div><div class=""><br class=""></div><div class="">Bruno, are there other concerns for modules as well?</div><div class=""><div class=""><div><br class=""><blockquote type="cite" class=""><div class=""><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class=""> </span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class="">That’s actually a problem that I spend a bunch of time working around in my CUDA standard library port. I don’t want to interfere with <atomic> so I make <cuda/atomic> but then that header wants to include <type_traits> instead of the <cuda/type_traits> that I need it to find. If it included "type_traits" instead, it would all just work.<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class=""><o:p class=""> </o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class="">So I have work-arounds for that, and obviously I can also flip <> to "" in my fork, but do you want to see ""?<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class=""><o:p class=""> </o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class="">Makes sense?<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class=""><o:p class=""> </o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class="">Olivier<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class=""><o:p class=""> </o:p></span></div><div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(181, 196, 223); padding: 3pt 0in 0in;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><b class=""><span style="" class="">From:<span class="Apple-converted-space"> </span></span></b><span style="" class=""><<a href="mailto:dexonsmith@apple.com" class="">dexonsmith@apple.com</a>> on behalf of Duncan Exon Smith <<a href="mailto:dexonsmith@apple.com" class="">dexonsmith@apple.com</a>><br class=""><b class="">Date:<span class="Apple-converted-space"> </span></b>Friday, January 18, 2019 at 5:46 AM<br class=""><b class="">To:<span class="Apple-converted-space"> </span></b>Olivier Giroux <<a href="mailto:OGiroux@nvidia.com" class="">OGiroux@nvidia.com</a>><br class=""><b class="">Cc:<span class="Apple-converted-space"> </span></b>Libc++ Dev <<a href="mailto:libcxx-dev@lists.llvm.org" class="">libcxx-dev@lists.llvm.org</a>><br class=""><b class="">Subject:<span class="Apple-converted-space"> </span></b>Re: [libcxx-dev] Why does libcxx include its own files this way?<o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class=""><o:p class=""> </o:p></span></div></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class="">I don’t think we want Libc++ to pick up files in -iquote search paths. <o:p class=""></o:p></div><div class=""><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 12pt; font-family: Calibri, sans-serif;"><br class="">On Jan 17, 2019, at 22:20, Olivier Giroux via libcxx-dev <<a href="mailto:libcxx-dev@lists.llvm.org" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">libcxx-dev@lists.llvm.org</a>> wrote:<o:p class=""></o:p></p></div><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class="" type="cite"><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class="">Inside of libcxx, you can see #include <name> being used when the library is _<i class="">clearly</i>_ intending for it to find the file that #include "name" would find. I say it’s clear because, if any other file in the world were chosen, then the library would likely fail to compile.</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class=""> </span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class="">It looks to me like the use of #include <name> is an attempt to enforce a reservation on this name in the filesystem of the build machine. If true, then it’s kind of an overreach. I’d personally much rather if these sideways includes used #include "name" instead.</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class=""> </span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class="">Is there a better explanation for why this is done this way?</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class=""> </span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class="">Olivier</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class=""> </span><o:p class=""></o:p></div><div class=""><div class="MsoNormal" align="center" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif; text-align: center;"><span style="font-size: 11pt;" class=""><hr size="0" width="89%" align="center" class=""></span></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class="">This email message is for the sole use of the intended recipient(s) and may contain confidential information.  Any unauthorized review, use, disclosure or distribution is prohibited.  If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.<o:p class=""></o:p></span></div></div><div class=""><div class="MsoNormal" align="center" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif; text-align: center;"><span style="font-size: 11pt;" class=""><hr size="0" width="89%" align="center" class=""></span></div></div></div></blockquote><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class="" type="cite"><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class="">_______________________________________________<br class="">libcxx-dev mailing list<br class=""><a href="mailto:libcxx-dev@lists.llvm.org" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">libcxx-dev@lists.llvm.org</a><br class=""><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-dev" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-dev</a></span></div></div></blockquote></div></div></blockquote></div><br class=""></div></div></body></html>