Jonathan Wakely <jwakely....@gmail.com> writes: > 2009/11/17 Ian Lance Taylor: >> >> I don't really understand how this interacts with std::tr1:array, >> though. > > For it to be a more convenient drop-in replacement for builtin arrays > you want to initialise tr1::array like so: > > std::tr1::array<int> a = { 0, 1, 2 }; > > rather than > > std::tr1::array<int> a = { { 0, 1, 2 } }; > > but the former gives the warning.
OK, to me that seems like an excellent reason to implement a special case for the warning here. For example, perhaps if a struct has only one field, and that field is an aggregate, then we don't warn if there is only one set of braces. Ian