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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [lookup/] [using46.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/51141
2
// { dg-do compile }
3
// { dg-options "-fpermissive -w -Werror" }
4
 
5
typedef int size_t;
6
template < size_t, size_t > struct AlignedBuffer {};
7
 
8
template < typename > class VectorBufferBase
9
{
10
public:
11
    allocateBuffer (size_t) {
12
    }
13
    buffer () {
14
    }
15
    *m_buffer;
16
    size_t m_capacity;
17
};
18
 
19
template < typename T, size_t > class VectorBuffer:VectorBufferBase < T >
20
{
21
    typedef VectorBufferBase < T > Base;
22
 
23
public:
24
    VectorBuffer () {
25
    }
26
    allocateBuffer (size_t) {
27
        m_capacity = 0;
28
    }
29
    Base::buffer;
30
    Base::m_buffer;
31
    Base::m_capacity;
32
    size_t m_inlineBufferSize;
33
 
34
    AlignedBuffer < 0, __alignof__ (T) > m_inlineBuffer;
35
};
36
 
37
template < typename T, size_t > class Vector
38
{
39
    typedef VectorBuffer < T,
40
 
41
public:
42
    void shrinkCapacity (size_t);
43
 
44
    clear () {
45
        shrinkCapacity (0);
46
    }
47
    Buffer m_buffer;
48
};
49
 
50
template < typename T, size_t inlineCapacity > void Vector < T,
51
         inlineCapacity >::shrinkCapacity (size_t)
52
{
53
    m_buffer.allocateBuffer (0);
54
}
55
 
56
struct PatternDisjunction;
57
struct YarrPattern {
58
    reset () {
59
        m_disjunctions.clear ();
60
    }
61
    Vector < PatternDisjunction *, 0 > m_disjunctions;
62
};

powered by: WebSVN 2.1.0

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