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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [template/] [ptrmem21.C] - Blame information for rev 315

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

Line No. Rev Author Line
1 301 jeremybenn
// PR c++/43868
2
// { dg-options "-g" }
3
 
4
struct Foo
5
{
6
    virtual void do_something() = 0;
7
};
8
 
9
template 
10
struct Foo_impl;
11
 
12
template 
13
struct Foo_impl : public Foo
14
{
15
    struct Helper
16
    {
17
        typedef int Some_type;
18
        operator Some_type () const { return 0; }
19
        Helper( R (O::*)() const) {}
20
    };
21
 
22
    void do_something() {  Helper( 0); };
23
};
24
 
25
void register_foo_internal( Foo*) {};
26
 
27
template 
28
void register_foo( TT) { register_foo_internal( new Foo_impl()); }
29
 
30
struct Bar
31
{
32
};
33
 
34
void setup()
35
{
36
    register_foo( (int (Bar::*) () const) 0);
37
}

powered by: WebSVN 2.1.0

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