https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96936
Bug ID: 96936 Summary: brace initialization of const char* from string literal in specific cases doesn't compile Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: kirshamir at gmail dot com Target Milestone: --- template<typename T, typename U> auto convert(U&& t) { // fails - see link to compiler explorer: return T{std::forward<U>(t)}; // succeeds: // return T(std::forward<U>(t)); } Code: https://godbolt.org/z/5q5sfb Related to (seem to be the same issue): https://stackoverflow.com/questions/63740618/need-for-stddecay-in-noexcept-operator