The following code works under gcc versions 2.9 through 4.4 but not version 4.5:

```
 struct Pass {
 };

 int main(void){
 Pass **passes = new ( Pass (*[ 10 ]) );
 }

```

The specific error message with gcc 4.5 is: 

```
prob.cc: In function ‘int main()’:
prob.cc:6:31: warning: lambda expressions only available with -std=c++0x or -std=gnu++0x
prob.cc:6:38: error: no matching function for call to ‘Pass::Pass(void (&)())’
prob.cc:2:1: note: candidates are: Pass::Pass()
prob.cc:2:1: note:                 Pass::Pass(const Pass&)

```

Adding the requested flag silences the initial warning but does not fix the issue. Could someone explain how to fix this? This is from some obscure piece of C++ code I'm maintaining and I know only a limited amount of C++.