http://llvm.org/bugs/show_bug.cgi?id=21787

Balázs Kádár <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |---

--- Comment #2 from Balázs Kádár <[email protected]> ---
I wasn't calling it directly. I was using the boost range library.
My original code was of this form:
{
    using namespace boost::adaptors;
    std::vector<struct X> x;
    boost::join( x | transformed(lambda1) | filtered(lambda2), separator);
}
This compiles and works correctly with GCC and MSVC, but fails to compile with
Clang. The difference between Clang and GCC was that on Clang the iterator
returned by transformed didn't satisfy ForwardRangeConcept because it wasn't
default constructible because boost didn't wrap the lambda into boost::optional
because boost::has_trivial_default_constructor was true for the lambda because
BOOST_HAS_TRIVIAL_CONSTRUCTOR is implemented as __has_trivial_constructor(T)
(on all of GCC, MSVC and Clang) which is false on GCC and true on Clang.

So if it is correct in Clang, is it a bug in both GCC and Boost?

(Also all the clang docs say about __has_trivial_constructor is that it should
be working as it does with GCC and MSVC.)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to