<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
That's correct. I was using the 7.0.0 release. Good to know it's fixed in 8.0. Thanks for investigating!</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Eric Fiselier <eric@efcs.ca><br>
<b>Sent:</b> Thursday, April 25, 2019 3:22 AM<br>
<b>To:</b> Marshall Clow<br>
<b>Cc:</b> Wesley Yue; libcxx-dev@lists.llvm.org<br>
<b>Subject:</b> Re: [libcxx-dev] Potential bug in use of auto in comparator lambda for std::upper_bound when debug build is enabled</font>
<div> </div>
</div>
<div>
<div dir="ltr">The code referenced in the diagnostics appears in 7.0 but not 8.0.
<div>At some point the debug implementation was removed from upper and lower bound,</div>
<div>but I can't find the exact commit that removed it.</div>
<div><br>
</div>
<div>Either way this should be fixed now.</div>
<div><br>
</div>
<div>/Eric</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Wed, Apr 24, 2019 at 8:41 AM Marshall Clow via libcxx-dev <<a href="mailto:libcxx-dev@lists.llvm.org">libcxx-dev@lists.llvm.org</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<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" target="_blank">libcxx-dev@lists.llvm.org</a>> wrote:<br>
</div>
<div class="x_gmail_quote">
<blockquote class="x_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>
_______________________________________________<br>
libcxx-dev mailing list<br>
<a href="mailto:libcxx-dev@lists.llvm.org" target="_blank">libcxx-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-dev</a><br>
</blockquote>
</div>
</div>
</body>
</html>