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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [template/] [access19.C] - Blame information for rev 825

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

Line No. Rev Author Line
1 149 jeremybenn
/* PR c++/29475 The error diagnostic contained "U = U" instead of "U = char" */
2
/* { dg-do "compile" } */
3
 
4
template< class T >
5
class explicit_t
6
{
7
public:
8
        explicit_t( const T& c ): value( c ) { }
9
        operator T&() { return value; }
10
private:
11
        template< class U >
12
        explicit_t( U t ); /* { dg-error "with U = char, T = int|is private" } */
13
        T value;
14
};
15
 
16
int foo( int x, explicit_t< int > y )
17
{
18
        return x + y;
19
}
20
 
21
int main()
22
{
23
        return foo( 5, 'c' ); /* { dg-error "this context" } */
24
}

powered by: WebSVN 2.1.0

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