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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [template/] [ptrmem22.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++/44778
2
 
3
enum Healpix_Ordering_Scheme { RING, NEST };
4
 
5
class Healpix_Base
6
  {
7
  protected:
8
    Healpix_Ordering_Scheme scheme_;
9
    int nest2ring (int pix) const;
10
    int ring2nest (int pix) const;
11
 
12
    typedef int (Healpix_Base::*swapfunc)(int pix) const;
13
  };
14
 
15
template class Healpix_Map: public Healpix_Base
16
  {
17
  public:
18
    void Import_nograde (const Healpix_Map &orig)
19
      {
20
        swapfunc swapper = (scheme_ == NEST) ?
21
          &Healpix_Map::ring2nest : &Healpix_Map::nest2ring;
22
      }
23
  };
24
 
25
int main()
26
  {
27
  Healpix_Map a,b;
28
  a.Import_nograde(b);
29
  }

powered by: WebSVN 2.1.0

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