view gcc/testsuite/g++.dg/cpp0x/ref-qual4.C @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
line wrap: on
line source

// 12.1: A constructor shall not be declared with a ref-qualifier.
// 12.4: A destructor shall not be declared with a ref-qualifier.

// { dg-require-effective-target c++11 }

struct A {
  A() & = default;		// { dg-error "constructor" }
  ~A() & = default;		// { dg-error "destructor" }
};

int main()
{
  A a;
}