Re: [v3 PATCH] Fix an access problem in variant.

2017-02-08 Thread Jonathan Wakely
On 08/02/17 13:56 +, Jonathan Wakely wrote: Definitely a clang bug, see http://melpon.org/wandbox/permlink/PkbNSpvjPrLh8rov If we remove the nested namespace we see that the friend declaration is declaring a second, unrelated function, and so we get an ambiguity: http://melpon.org/wandbox/pe

Re: [v3 PATCH] Fix an access problem in variant.

2017-02-08 Thread Jonathan Wakely
On 07/02/17 23:29 +0200, Ville Voutilainen wrote: On 7 February 2017 at 22:00, Ville Voutilainen wrote: Currently, clang rejects all attempts to visit a libstdc++ variant: https://godbolt.org/g/kSmBTg While gcc doesn't reject such code, that seems like an access checking bug. This patch makes

Re: [v3 PATCH] Fix an access problem in variant.

2017-02-07 Thread Ville Voutilainen
On 7 February 2017 at 22:00, Ville Voutilainen wrote: > Currently, clang rejects all attempts to visit a libstdc++ variant: > https://godbolt.org/g/kSmBTg > > While gcc doesn't reject such code, that seems like an access checking > bug. This patch makes the offending _M_u member accessible for the