OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [lambda/] [lambda-ctor-neg.C] - Rev 301

Compare with Previous | Blame | View Log

// { dg-options -std=c++0x }

void f()
{
  int i;
  auto lam = [i]{};             // { dg-message "note" }
  decltype(lam) lam2 = { 1 };   // { dg-error "" "not an aggregate" }
  decltype(lam) lam3;           // { dg-error "" "deleted default ctor" }
  lam3 = lam;                   // { dg-error "" "deleted assignment op" }
}

template <class T>
void g(T i)
{
  auto lam = [i]{};             // { dg-message "note" }
  decltype(lam) lam2 = { 1 };   // { dg-error "" "not an aggregate" }
  decltype(lam) lam3;           // { dg-error "" "deleted default ctor" }
  lam3 = lam;                   // { dg-error "" "deleted assignment op" }
}

int main()
{
  f();
  g(1);
}

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.