Apologies if the issue was already reported but have a look at the following code snippet
#include <variant> std::variant<int, char*> foo() { return 0xD; }
This should compile by choosing the converting constructor overload of the variant whose definition is
template< class T > constexpr variant(T&& t) noexcept(...);
but it does not compile as can be seen here.
Compiler flags used: -std=c++17 -O3 -Wall -Werror
Compiler version: v19.0.1
TCE Level:
TCE Open Date:
Tuesday, February 4, 2020 - 01:36