[libcxx-dev] Potential bug in use of auto in comparator lambda for std::upper_bound when debug build is enabled
Eric Fiselier via libcxx-dev
libcxx-dev at lists.llvm.org
Thu Apr 25 00:22:02 PDT 2019
The code referenced in the diagnostics appears in 7.0 but not 8.0.
At some point the debug implementation was removed from upper and lower
but I can't find the exact commit that removed it.
Either way this should be fixed now.
On Wed, Apr 24, 2019 at 8:41 AM Marshall Clow via libcxx-dev <
libcxx-dev at lists.llvm.org> wrote:
> On Wed, Apr 24, 2019 at 9:15 AM Wesley Yue via libcxx-dev <
> libcxx-dev at lists.llvm.org> wrote:
>> 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
>> Here is some minimal code to reproduce, and the corresponding compilation
> I just tried this with libc++ trunk, and didn't get a compile error.
> (I got a link error, but that's because I wasn't linking against a debug
> What version of libc++ are you using?
> -- Marshall
> libcxx-dev mailing list
> libcxx-dev at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the libcxx-dev