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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [template/] [instantiate10.C] - Blame information for rev 715

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

Line No. Rev Author Line
1 693 jeremybenn
/* PR c++/39242, xplicit instantiation declaration prohibits implicit
2
   instantiation of non-inline functions.  */
3
/* { dg-do compile } */
4
/* { dg-options "-O" } */
5
 
6
class Rep {
7
public:
8
    void unref() const { }
9
    static void unref (const Rep * obj_r) { obj_r->unref(); }
10
};
11
template
12
class RepPtrStore {
13
    _Tp * _obj;
14
    void _assign( _Tp * new_r );
15
public:
16
    ~RepPtrStore() { _assign( 0 ); }
17
};
18
template
19
void RepPtrStore<_Tp,_Bt>::_assign( _Tp * new_r )
20
{
21
  Rep::unref( _obj );
22
}
23
class RepPtrBase { };
24
template class PtrBase : public RepPtrBase { };
25
template
26
class Ptr : public PtrBase<_Bt> {
27
    RepPtrStore<_Tp,_Bt> _ptr;
28
};
29
class YCode;
30
class YStatement;
31
typedef Ptr YStatementPtr;
32
extern template class RepPtrStore;
33
class ExecutionEnvironment {
34
    YStatementPtr m_statement;
35
    ~ExecutionEnvironment() { };
36
};
37
 

powered by: WebSVN 2.1.0

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