[Bug c++/58760] Lookup of a non-type template argument fails for an initializer of a const non-static member
ville.voutilainen at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Oct 16 22:46:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58760
--- Comment #3 from Ville Voutilainen <ville.voutilainen at gmail dot com> ---
This, however, works fine:
#include <iostream>
template<int N>
struct A
{
const int X = N;
};
int main(int argc, const char *argv[])
{
A<666> n;
std::cout << "n.X = " << n.X << "\n";
}
Having a nested class template seems to trigger it.
More information about the Gcc-bugs
mailing list