[Bug c++/49988] constexpr on ctor invokes improper initialization
faisalv at yahoo dot com
gcc-bugzilla@gcc.gnu.org
Fri Aug 5 14:00:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49988
--- Comment #1 from Faisal Vali <faisalv at yahoo dot com> 2011-08-05 13:59:55 UTC ---
Also, changing the parameter to a pointer to an array makes the code work
correctly:
struct A {
char data[3];
template<int ... I>
constexpr
// NOTE: now it is a pointer to an array - not just a pointer to char
A(const char (*s)[3], X<I...> x) : data{ (*s)[I]...} { }
};
More information about the Gcc-bugs
mailing list