That's fine, but how does one intialise a Boost.Array in member intialiser
list, e.g.:
The only way I found to do this is
#include
struct Foo
{
Foo()
: m_a((boost::array){1,2,3,4})
{
}
boost::array m_a;
};
I am using this kind of construction often now because it is the
cleanest and the most explicit that I can get but I don't know the
degree of portability or even correctness of such code.
For example I know that it works in GCC 4.1.2, GCC 4.4 and IntelCC 11
but it gives an error with gcc option -pedantic-errors (error: ISO C++
forbids compound-literals).
Despite of this possible issue I am using it anyway, but I also would
like to know what are the possible issues and portability (please, let
me know if you compiler is not gcc).
Alfredo