summaryrefslogtreecommitdiffstats
path: root/test/CXX/special/class.ctor/p4-0x.cpp
blob: e3508e2e8c4765e05ce0d1d59ad67821554cf1e8 (plain)
1
2
3
4
5
6
7
// RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s

// A constructor shall not be declared with a ref-qualifier.
struct X {
  X() &; // expected-error{{ref-qualifier '&' is not allowed on a constructor}}
  X(int) &&; // expected-error{{ref-qualifier '&&' is not allowed on a constructor}}
};
OpenPOWER on IntegriCloud