Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile error with clang and libc++ #38

Closed
khegeman opened this issue May 22, 2014 · 2 comments
Closed

compile error with clang and libc++ #38

khegeman opened this issue May 22, 2014 · 2 comments

Comments

@khegeman
Copy link

 clang++ --version
Ubuntu clang version 3.4-1~exp1 (branches/release_34) (based on LLVM 3.4)
CMAKE_CXX_FLAGS=-stdlib=libc++  
-- cotire 1.4.1 loaded.
-- Configuring done
-- Generating done
-- Build files have been written to: /build/clang_bandit
[  5%] Building CXX object CMakeFiles/bandit-specs.dir/specs/main.cpp.o
In file included from /bandit/specs/main.cpp:1:
In file included from /build/clang_bandit/cotire/bandit-specs_CXX_prefix.hxx:4:
In file included from /bandit/specs/specs.h:4:
In file included from /bandit/bandit/bandit.h:5:
In file included from /usr/include/c++/v1/functional:465:
In file included from /usr/include/c++/v1/memory:599:
/usr/include/c++/v1/tuple:320:11: fatal error: rvalue reference to type '<lambda at /bandit/bandit/grammar.h:111:42>' cannot bind to lvalue of type
      '<lambda at /bandit/bandit/grammar.h:111:42>'
        : value(__t.get())
          ^     ~~~~~~~~~
/usr/include/c++/v1/tuple:444:8: note: in instantiation of member function 'std::__1::__tuple_leaf<0, <lambda at /bandit/bandit/grammar.h:111:42> &&, false>::__tuple_leaf' requested here
struct __tuple_impl<__tuple_indices<_Indx...>, _Tp...>
       ^
/usr/include/c++/v1/functional:1278:26: note: in instantiation of member function 'std::__1::__function::__func<<lambda at /bandit/bandit/grammar.h:111:42>, std::__1::allocator<<lambda at
      /bandit/bandit/grammar.h:111:42> >, void ()>::__func' requested here
            ::new (__f_) _FF(_VSTD::move(__f));
                         ^
/bandit/bandit/grammar.h:111:42: note: in instantiation of function template specialization 'std::__1::function<void ()>::function<<lambda at /bandit/bandit/grammar.h:111:42> >' requested
      here
      assertion_adapter.adapt_exceptions([&](){


@khegeman
Copy link
Author

khegeman commented Jun 9, 2014

this was a libc++ bug.

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

I tested with a newer release of libc++ and this error is gone.

@khegeman khegeman closed this as completed Jun 9, 2014
@joakimkarlsson
Copy link
Collaborator

Thanks for reporting, and for the follow-up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants