From owner-freebsd-toolchain@FreeBSD.ORG Thu Mar 6 13:28:39 2014 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A064E1DD; Thu, 6 Mar 2014 13:28:39 +0000 (UTC) Received: from smtpout3.timeweb.ru (smtpout3.timeweb.ru [92.53.117.25]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5488D260; Thu, 6 Mar 2014 13:28:38 +0000 (UTC) Received: from [213.148.20.85] (helo=hive.panopticon) by smtp.timeweb.ru with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1WLYLe-0006D2-5A; Thu, 06 Mar 2014 17:28:30 +0400 Received: from hades.panopticon (hades.panopticon [192.168.0.32]) by hive.panopticon (Postfix) with ESMTP id A68B2752; Thu, 6 Mar 2014 17:28:29 +0400 (MSK) Received: by hades.panopticon (Postfix, from userid 1000) id 9D7082B876; Thu, 6 Mar 2014 17:28:29 +0400 (MSK) Date: Thu, 6 Mar 2014 17:28:29 +0400 From: Dmitry Marakasov To: =?utf-8?Q?Jean-S=C3=A9bastien_P=C3=A9dron?= Subject: Re: Various issues with Clang and libc++ while playing with OpenCL (FYI) Message-ID: <20140306132829.GB92463@hades.panopticon> References: <53170AD1.4090506@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <53170AD1.4090506@FreeBSD.org> User-Agent: Mutt/1.5.22 (2013-10-16) Content-Transfer-Encoding: quoted-printable Cc: Koop Mast , freebsd-toolchain@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2014 13:28:39 -0000 * Jean-S=C3=A9bastien P=C3=A9dron (dumbbell@FreeBSD.org) wrote: > 3. Our base libc++ has a bug in the 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=3D75505 >=20 > 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=20 #include int main() { std::function f =3D [](){}; return 0; } % clang++ -std=3Dc++11 1.cc=20 % clang++34 -std=3Dc++11 1.cc=20 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 '' cannot bind to lvalue of type '' : value(__t.get()) ^ ~~~~~~~~~ /usr/include/c++/v1/tuple:444:8: note: in instantiation of member functio= n 'std::__1::__tuple_leaf<0, &&, false>::__tuple_le= af' 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<, std::__1::a= llocator< >, void ()>::__func' requested here ::new (__f_) _FF(_VSTD::move(__f)); ^ 1.cc:3:40: note: in instantiation of function template specialization 'st= d::__1::function::function< >' requested he= re int main() { std::function f =3D [](){}; 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 co= py 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 'alloca= tor<[...]>' cannot bind to lvalue of type 'allocator<[...]>' : value(__t.get()) ^ ~~~~~~~~~ /usr/include/c++/v1/tuple:444:8: note: in instantiation of member functio= n 'std::__1::__tuple_leaf<0, std::__1::allocator< > = &&, 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<, std::__1::a= llocator< >, 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 'st= d::__1::function::function< >' requested he= re int main() { std::function f =3D [](){}; 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 co= py 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. --- --=20 Dmitry Marakasov . 55B5 0596 FF1E 8D84 5F56 9510 D35A 80DD F9D2 F77D amdmi3@amdmi3.ru ..: jabber: amdmi3@jabber.ru http://www.amdmi3.ru