summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.robertl/eb10.C
blob: ba9c6db7db3be7fe63c844b0deff97a447ab3728 (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
// { dg-do assemble  }
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));
    }
};