Thanks. It's quite clear to me now.
Max
LoadCom writes:
Thanks that works.
?
Buy why that works?
?
Max
On 8/5/07, "JOAQUIN LOPEZ MU?Z"
wrote:
Use an added level of brace enclosing:
{{
{"Chun", "Wang", 1441},
{"Chia", "Wang", 1443},
{"Ta", "Wang", 1445}
}};
[...]
boost::array is an agregate class (which means
you can initialize it with a brace-enclosed list)
containing a member
T elems[N];
which is in turn an aggregate. So, if you've got a
boost::array, the list
{
{"Chun", "Wang", 1441},
...
}
is apt to initialize elems, and for initializing the
boost::array you've got to add another level of {}:
{{
{"Chun", "Wang", 1441},
...
}}
although the standard allows the omission of the outer
level under some circumnstances, as noted in
http://boost.org/doc/html/array/rationale.html
Hope it's clearer now. Best,
Joaquín M López Mu?oz
Telefónica, Investigación y Desarrollo
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users