Re: [PATCH] libstdc++: Diagnose visitors with different return types [PR95904]

2020-10-17 Thread Ville Voutilainen via Gcc-patches
On Sat, 17 Oct 2020 at 20:30, Stephan Bergmann wrote: > Clang (with -std=c++17/20) now complains about > > > include/c++/11.0.0/variant:1032:10: error: no matching constructor for > > initialization of 'std::__nonesuch' > > return __nonesuch{}; > >^

Re: [PATCH] libstdc++: Diagnose visitors with different return types [PR95904]

2020-10-17 Thread Stephan Bergmann via Gcc-patches
On 08/10/2020 16:27, Jonathan Wakely via Gcc-patches wrote: On 05/10/20 22:35 +0300, Ville Voutilainen via Libstdc++ wrote: On Mon, 5 Oct 2020 at 01:15, Ville Voutilainen wrote: The patch is borked, doesn't pass tests, fixing... Unborked, ok for trunk if full testsuite passes? Assuming it

Re: [PATCH] libstdc++: Diagnose visitors with different return types [PR95904]

2020-10-10 Thread Ville Voutilainen via Gcc-patches
On Sat, 10 Oct 2020 at 13:52, Jonathan Wakely wrote: > index_sequence uses size_t not unsigned long. This parameter pack > needs to be size_t... _Idxs, and the NTTP for __check_visitor_result > should be size_t _Idx. Fixed in

Re: [PATCH] libstdc++: Diagnose visitors with different return types [PR95904]

2020-10-10 Thread Jonathan Wakely via Gcc-patches
On 05/10/20 22:35 +0300, Ville Voutilainen via Libstdc++ wrote: On Mon, 5 Oct 2020 at 01:15, Ville Voutilainen wrote: The patch is borked, doesn't pass tests, fixing... Unborked, ok for trunk if full testsuite passes? 2020-10-05 Ville Voutilainen PR libstdc++/95904 *

Re: [PATCH] libstdc++: Diagnose visitors with different return types [PR95904]

2020-10-08 Thread Jonathan Wakely via Gcc-patches
On 05/10/20 22:35 +0300, Ville Voutilainen via Libstdc++ wrote: On Mon, 5 Oct 2020 at 01:15, Ville Voutilainen wrote: The patch is borked, doesn't pass tests, fixing... Unborked, ok for trunk if full testsuite passes? Assuming it has passed by now, OK. Thanks.

Re: [PATCH] libstdc++: Diagnose visitors with different return types [PR95904]

2020-10-05 Thread Ville Voutilainen via Gcc-patches
On Mon, 5 Oct 2020 at 01:15, Ville Voutilainen wrote: > The patch is borked, doesn't pass tests, fixing... Unborked, ok for trunk if full testsuite passes? 2020-10-05 Ville Voutilainen PR libstdc++/95904 * include/std/variant (__deduce_visit_result): Add a nested ::type.

Re: [PATCH] libstdc++: Diagnose visitors with different return types [PR95904]

2020-10-04 Thread Ville Voutilainen via Gcc-patches
On Sat, 3 Oct 2020 at 01:14, Jonathan Wakely wrote: > OK for trunk with those leading spaces switched to tab. The patch is borked, doesn't pass tests, fixing...

Re: [PATCH] libstdc++: Diagnose visitors with different return types [PR95904]

2020-10-02 Thread Jonathan Wakely via Gcc-patches
On 29/09/20 19:35 +0300, Ville Voutilainen via Libstdc++ wrote: On Tue, 29 Sep 2020 at 14:20, Jonathan Wakely wrote: I think this is what we want: template constexpr inline __same_types = (is_same_v<_Tp, _Types> && ...); is_same_v is very cheap, it uses the built-in directly, so you

Re: [PATCH] libstdc++: Diagnose visitors with different return types [PR95904]

2020-09-29 Thread Ville Voutilainen via Gcc-patches
On Tue, 29 Sep 2020 at 14:20, Jonathan Wakely wrote: > I think this is what we want: > >template > constexpr inline __same_types = (is_same_v<_Tp, _Types> && ...); > > is_same_v is very cheap, it uses the built-in directly, so you don't > need to instantiate any class templates at all. >