Here's the code that I have a problem with:
class Foo {
public:
Foo() :
memberArray{Bar(1), Bar(3), Bar(2)}
{}
struct Bar {
Bar(int param1) { }
};
private:
std::array<Bar,3> memberArray;
// Bar memberArray[3]; // Using a raw array like this instead compiles fine..
};
I'm using GCC 4.6.1, and compiling for c++11. How should I initialise my std::array?