blob: 071a36008f81b2dc6be0814605bb209a281cdb55 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// { dg-do assemble }
// GROUPS passed constructors
// ctor file
// Message-Id: <199306151813.gD28471@mail.Germany.EU.net>
// From: stephan@ifconnection.de (Stephan Muehlstrasser)
// Subject: gcc 2.4.3.1: illegal constructor call not rejected
// Date: Tue, 15 Jun 1993 18:34:14 +0200 (MET DST)
// C++0x mode doesn't print the deleted copy constructor as a candidate.
// { dg-prune-output ":14:" }
#include <fstream>
class X : public std::ifstream {
public:
X(int a, const char *b) {} // { dg-message "note" } candidate
};
int main()
{
X *y = new X(10, "123");
// the compiler must reject this constructor call:
X *x = new X("abc");// { dg-error "match" }
// { dg-message "candidate" "candidate note" { target *-*-* } 22 }
}
|