aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.robertl/eb10.C
blob: 7da5d7562ee225d0e9353e0876a31a8a8948439a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Build don't link:
template <int object_size>
class _fixed_size_allocator
{
  private:

    struct      something { };
    static something *  asdf;

  public:

    static void         delete_object ();
};


template <class T>
class object_allocator
{
  private:

    typedef     _fixed_size_allocator<sizeof (T)>               allocator;

  public:

    static void         deallocate (T * p)
    {
        allocator::delete_object (reinterpret_cast<void *> (p));
    }
};