[Bug c++/83912] [constexpr] struct with a pointer to one of its members, returned by a function, is not a constant expression
giu.campana at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Jan 18 21:34:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83912
--- Comment #3 from Giuseppe Campana <giu.campana at gmail dot com> ---
The snippet showed by DR2022
(http://open-std.org/JTC1/SC22/WG21/docs/cwg_defects.html#2022) works fine with
gcc, but it fails to compile if the object passes through a function. As
pointed out by Jakub, in these cases clang succeeds only is the object is not a
local constexpr.
More information about the Gcc-bugs
mailing list