Why does template constuctor only work at global scope? Bug?

Jonathan Wakely jwakely.gcc@gmail.com
Thu Oct 15 00:32:00 GMT 2009

2009/10/14 Ben Bridgwater:
> Can anyone tell me why this template constructor only works at global scope?

http://gcc.gnu.org/bugs/ or the gcc-help mailing list.

This mailing list is for discussing development of GCC, not help using it.

> I realize I could use a std::initializer_list<int> constructor
> instead, but I'm curious why what I'm trying doesn't work.

(int[]) is an incomplete type. Unless I've missed a change in C++0x
which makes it valid, it shouldn't work in either place you use it.
If I have missed a change in C++0x, it probably doesn't work because
it's not implemented in GCC yet.

More information about the Gcc mailing list