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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-7.2/] [gdb/] [testsuite/] [gdb.cp/] [pr9167.cc] - Blame information for rev 330

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 330 jeremybenn
#include <iostream>
2
 
3
template<typename DATA>
4
struct ATB
5
{
6
    int data;
7
    ATB() : data(0) {}
8
};
9
 
10
 
11
template<typename DATA,
12
         typename DerivedType >
13
class A : public ATB<DATA>
14
{
15
public:
16
    static DerivedType const DEFAULT_INSTANCE;
17
};
18
 
19
template<typename DATA, typename DerivedType>
20
const DerivedType A<DATA, DerivedType>::DEFAULT_INSTANCE;
21
 
22
class B : public A<int, B>
23
{
24
 
25
};
26
 
27
int main()
28
{
29
    B b;
30
    // If this if-block is removed then GDB shall
31
    // not infinitely recurse when trying to print b.
32
 
33
    return 0;            // marker
34
}
35
 
36
 

powered by: WebSVN 2.1.0

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