<div dir="ltr"><div dir="ltr">On Wed, Apr 24, 2019 at 9:15 AM Wesley Yue via libcxx-dev <<a href="mailto:libcxx-dev@lists.llvm.org">libcxx-dev@lists.llvm.org</a>> wrote:<br></div><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 dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<div style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small;background-color:rgb(255,255,255)">
I'm working on some code that compares two different types with std::upper_bound and does so with a custom lambda, which takes both parameters as type "auto". When building normally, this compiles fine. When building with -D_LIBCPP_DEBUG=1, this fails and somewhere
 in the template magic, libc++ seems to confuse the two types and pass them into the lambda backwards.</div>
<div style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small;background-color:rgb(255,255,255)">
<br>
</div>
<div style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small;background-color:rgb(255,255,255)">
Here is some minimal code to reproduce, and the corresponding compilation error:</div></div></div></blockquote><div><br></div><div>I just tried this with libc++ trunk, and didn't get a compile error.</div><div>(I got a link error, but that's because I wasn't linking against a debug dylib)</div><div><br></div><div>What version of libc++ are you using?</div><div><br></div><div>-- Marshall</div><div><br></div><div><br></div></div></div>