MinGW C++0x - problem with array initialization

Technically, this should be legal in C++11(0x), and initializer lists are supposedly supported since GCC 4.4 (I'm using MinGW 4.5.2) - yet I am getting an error "bad array initializer" when trying to compile this. "points" is just a Vector2D[4]. I am compiling with std=c++0x, so that's not the problem. Am I doing something really wrong, or is MinGW just revolting against me (again)?

1
2
3
4
5
6
7
8
9
10
BoundingBox::BoundingBox(float width, float height, float posX, float posY) :
points{
	      Vector2D(posX,posY),
	      Vector2D(posX+width, posY),
	      Vector2D(posX+width, posY+height),
	      Vector2D(posX, posY+height)
         }
{

}
closed account (1yR4jE8b)
I'm not exactly sure -- don't have a compiler on the computer I'm on, but I think it should be:

1
2
3
4
5
6
7
8
9
10
BoundingBox::BoundingBox(float width, float height, float posX, float posY) :
points({
	      Vector2D(posX,posY),
	      Vector2D(posX+width, posY),
	      Vector2D(posX+width, posY+height),
	      Vector2D(posX, posY+height)
         })
{

}

*parentheses around the initializer list
Nah that's not it. The syntax is correct, the exact same thing works, for example, with a vector.
Topic archived. No new replies allowed.