[PATCH] libstdc++: Diagnose visitors with different return types [PR95904]
Ville Voutilainen
ville.voutilainen@gmail.com
Sat Oct 17 17:36:12 GMT 2020
On Sat, 17 Oct 2020 at 20:30, Stephan Bergmann <sbergman@redhat.com> 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{};
> > ^ ~~
> > include/c++/11.0.0/type_traits:2953:5: note: candidate constructor not viable: requires 1 argument, but 0 were provided
> > __nonesuch(__nonesuch const&) = delete;
> > ^
>
> upon #include <variant>. (And I think legitimately so, as __nonsuch is
> not dependent?)
This is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97449, I'll
commit a fix today.
More information about the Libstdc++
mailing list