URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [lambda/] [lambda-capture-redundancy.C] - Rev 693
Compare with Previous | Blame | View Log
// FDIS 5.1.2/8
// { dg-options "-pedantic-errors -std=c++0x" }
struct S2 { void f(int i); };
void S2::f(int i) {
[&, i]{ }; // OK
[&, &i]{ }; // { dg-error "" } i preceded by & when & is the default
[=, i]{ }; // { dg-error "" } i not preceded by & when = is the default
[=, this]{ }; // { dg-error "" } this when = is the default
[i, i]{ }; // { dg-error "" } i repeated
[this, this]{ }; // { dg-error "" } i repeated
}