https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103879
Patrick Palka changed:
What|Removed |Added
Ever confirmed|0 |1
CC|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103879
--- Comment #4 from Jonathan Wakely ---
(In reply to Andrew Pinski from comment #1)
> clang rejects it also (with their libc++):
Libc++ doesn't support constexpr std::string, and I think it's missing some DRs
to std::variant as well. So I would
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103879
Luiz Henrique Laurini changed:
What|Removed |Added
CC||lhlaurini at hotmail dot com
--
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103879
--- Comment #2 from Andrew Pinski ---
MSVC also rejects it:
example.cpp
(14): error C2131: expression did not evaluate to a constant
(10): note: failure was caused by call of undefined function or one not
declared 'constexpr'
(10): note: see usa
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103879
--- Comment #1 from Andrew Pinski ---
clang rejects it also (with their libc++):
:10:5: error: variable of non-literal type 'S' cannot be defined in a
constexpr function
S s{"str"};
^
:6:29: note: 'S' is not literal because it has data me