This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc interprets C++0x initialization construct as function declarationâ


On 5 January 2011 00:30, Jeffrey Walton wrote:
>
> Try T t(S(1, 0.1));

That's not valid in C++03 or C++0x, S has no suitable constructor.

> I'm not sure C++0X would help (see Intializer Lists at
> http://www2.research.att.com/~bs/C++0xFAQ.html)

Initializer lists are exactly what's needed to make S{ 1, 0.1 } a
valid initialization.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]