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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/42447
2
 
3
template
4
  void* get(int);
5
 
6
template
7
  struct unique_ptr;
8
 
9
template
10
  struct unique_ptr<_Tp[]>
11
  {
12
    typedef int __tuple_type;
13
 
14
    void*
15
    get() const
16
    { return ::get<0>(_M_t); }
17
 
18
    __tuple_type _M_t;
19
  };
20
 
21
template  class dynamic_dispatch;
22
 
23
template 
24
  struct dynamic_dispatch
25
  {
26
    struct entry { };
27
    unique_ptr m_Start;
28
 
29
    template 
30
      void attach_handler(void (UC::*m)(int&))
31
      {
32
        entry* p = 0;
33
        do {
34
        } while(--p != m_Start.get());
35
      }
36
  };
37
 
38
template 
39
  class request_dispatcher
40
  : private dynamic_dispatch
41
  { request_dispatcher(); };
42
 
43
struct file_reader
44
{
45
  void execute_command(int&);
46
};
47
 
48
template <>
49
  request_dispatcher::request_dispatcher()
50
  { this->attach_handler(&file_reader::execute_command); }

powered by: WebSVN 2.1.0

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