File: common.h

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-16
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,496,368 kB
  • sloc: cpp: 5,593,980; ansic: 986,873; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,547; xml: 953; cs: 573; fortran: 567
file content (74 lines) | stat: -rw-r--r-- 1,842 bytes parent folder | download | duplicates (34)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#ifndef STRESS1_COMMON_H
#define STRESS1_COMMON_H

inline char function00(char x) { return x + x; }
inline short function00(short x) { return x + x; }
inline int function00(int x) { return x + x; }

namespace N01 { struct S00; }

namespace N00 {
struct S00 {
  char c;
  short s;
  int i;

  S00(char x) : c(x) {}
  S00(short x) : s(x) {}
  S00(int x) : i(x) {}

  char method00(char x) { return x + x; }
  short method00(short x) { return x + x; }
  int method00(int x) { return x + x; }

  operator char() { return c; }
  operator short() { return s; }
  operator int() { return i; }
};
struct S01 {};
struct S02 {};
template <typename T> struct S03 {
  struct S00 : N00::S00 {};
};
template <int I, template <typename> class U> struct S03<U<int>[I]>
    : U<int>::S00 {
  S03();
  S03(int);
  S03(short);
  S03(char);
  template <typename V = decltype(I)> S03(V);
};
template <> struct S03<S03<int>[42]> : S00 {};
}

namespace N01 {
struct S00 : N00::S00 {
  using N00::S00::S00;
};
struct S01 {};
struct S02 {};
}

using namespace N00;

template <int I, template <typename> class U> template <typename V> S03<U<int>[I]>::S03(V x) : S00(x) {}
template <int I, template <typename> class U> S03<U<int>[I]>::S03() : S00(I) {}
template <int I, template <typename> class U> S03<U<int>[I]>::S03(char x) : S00(x) {}
template <int I, template <typename> class U> S03<U<int>[I]>::S03(short x) : S00(x) {}
template <int I, template <typename> class U> S03<U<int>[I]>::S03(int x) : S00(x) {}

#pragma weak pragma_weak00
#pragma weak pragma_weak01
#pragma weak pragma_weak02
#pragma weak pragma_weak03
#pragma weak pragma_weak04
#pragma weak pragma_weak05

extern "C" int pragma_weak00();
extern "C" int pragma_weak01();
extern "C" int pragma_weak02();
extern "C" int pragma_weak03;
extern "C" int pragma_weak04;
extern "C" int pragma_weak05;

#endif