http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53494

--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-05-28 
16:21:24 UTC ---
4.6 gets the error right, what you're doing is equivalent to:

struct pair
{
  pair(const char*, int) { }
};

struct array
{
  pair data[1];
};

array a { { "smile", 1 } };

And that isn't valid. The error 4.6 gives for that is:

t.cc:11:26: error: too many initializers for 'pair [1]'
t.cc:11:26: error: could not convert '(const char*)"smile"' from 'const char*'
to 'pair'

Which is very similar to the error 4.6 gives for your original code, except he
types in your original are more complicated because they involve templates and
typedefs.

Reply via email to