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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [tc1/] [dr152.C] - Blame information for rev 301

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
// { dg-do compile }
2
// Origin: Giovanni Bajo 
3
// DR152: explicit copy constructors
4
 
5
namespace N1 {
6
  struct X {
7
    X();                        // { dg-message "candidate" }
8
    explicit X(const X&);
9
  };
10
  void f(X);
11
  int foo()
12
  {
13
    X x;
14
    f(x);     // { dg-error "matching" "matching" }
15
              // { dg-error "initializing" "initializing" { target *-*-* } 14 }
16
  }
17
}
18
 
19
namespace N2 {
20
  template 
21
  struct X {
22
    X();                        // { dg-message "candidate" }
23
    explicit X(const X&);
24
  };
25
 
26
  template 
27
  void f(T ) {}
28
 
29
  template 
30
  int foo()
31
  {
32
    X x;
33
    N2::f(x);   // { dg-error "matching" "matching" }
34
                // { dg-error "initializing " initializing" { target *-*-* } 33 }
35
  }
36
 
37
  template int foo();  // { dg-message "instantiated from here" }
38
}

powered by: WebSVN 2.1.0

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