* Jean-Sébastien Pédron ([email protected]) wrote:
> 3. Our base libc++ has a bug in the <functional> header. I posted a PR
> on Mesa bug tracker here, before I found out it was a problem with
> libc++:
> https://bugs.freedesktop.org/show_bug.cgi?id=75505
>
> Apparently, it's fixed in libc++ upstream, in r199848.
Hm, is this by the chance the same bug as the following?
Either way, it would be nice to get it fixed in 10-stable.
---
% cat 1.cc
#include <functional>
int main() { std::function<void()> f = [](){}; return 0; }
% clang++ -std=c++11 1.cc
% clang++34 -std=c++11 1.cc
In file included from 1.cc:1:
In file included from /usr/include/c++/v1/functional:465:
In file included from /usr/include/c++/v1/memory:603:
/usr/include/c++/v1/tuple:320:11: error: rvalue reference to type '<lambda at
1.cc:3:40>' cannot bind to lvalue of type '<lambda at 1.cc:3:40>'
: value(__t.get())
^ ~~~~~~~~~
/usr/include/c++/v1/tuple:444:8: note: in instantiation of member function
'std::__1::__tuple_leaf<0, <lambda at 1.cc:3:40> &&, false>::__tuple_leaf'
requested here
struct __tuple_impl<__tuple_indices<_Indx...>, _Tp...>
^
/usr/include/c++/v1/functional:1286:26: note: in instantiation of member
function 'std::__1::__function::__func<<lambda at 1.cc:3:40>,
std::__1::allocator<<lambda at 1.cc:3:40> >, void ()>::__func' requested here
::new (__f_) _FF(_VSTD::move(__f));
^
1.cc:3:40: note: in instantiation of function template specialization
'std::__1::function<void ()>::function<<lambda at 1.cc:3:40> >' requested here
int main() { std::function<void()> f = [](){}; return 0; }
^
In file included from 1.cc:1:
In file included from /usr/include/c++/v1/functional:465:
In file included from /usr/include/c++/v1/memory:603:
/usr/include/c++/v1/tuple:321:10: error: static_assert failed "Can not copy a
tuple with rvalue reference member"
{static_assert(!is_rvalue_reference<_Hp>::value, "Can not copy a tuple
with rvalue reference member");}
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/v1/tuple:320:11: error: rvalue reference to type
'allocator<[...]>' cannot bind to lvalue of type 'allocator<[...]>'
: value(__t.get())
^ ~~~~~~~~~
/usr/include/c++/v1/tuple:444:8: note: in instantiation of member function
'std::__1::__tuple_leaf<0, std::__1::allocator<<lambda at 1.cc:3:40> > &&,
false>::__tuple_leaf' requested here
struct __tuple_impl<__tuple_indices<_Indx...>, _Tp...>
^
/usr/include/c++/v1/functional:1294:34: note: in instantiation of member
function 'std::__1::__function::__func<<lambda at 1.cc:3:40>,
std::__1::allocator<<lambda at 1.cc:3:40> >, void ()>::__func' requested here
::new (__hold.get()) _FF(_VSTD::move(__f), allocator<_Fp>(__a));
^
1.cc:3:40: note: in instantiation of function template specialization
'std::__1::function<void ()>::function<<lambda at 1.cc:3:40> >' requested here
int main() { std::function<void()> f = [](){}; return 0; }
^
In file included from 1.cc:1:
In file included from /usr/include/c++/v1/functional:465:
In file included from /usr/include/c++/v1/memory:603:
/usr/include/c++/v1/tuple:321:10: error: static_assert failed "Can not copy a
tuple with rvalue reference member"
{static_assert(!is_rvalue_reference<_Hp>::value, "Can not copy a tuple
with rvalue reference member");}
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4 errors generated.
---
--
Dmitry Marakasov . 55B5 0596 FF1E 8D84 5F56 9510 D35A 80DD F9D2 F77D
[email protected] ..: jabber: [email protected] http://www.amdmi3.ru
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "[email protected]"