mycpp

Coverage Report

Created: 2024-06-09 06:28

/home/uke/oil/mycpp/gc_tuple.h
Line
Count
Source (jump to first uncovered line)
1
#ifndef MYCPP_GC_TUPLE_H
2
#define MYCPP_GC_TUPLE_H
3
4
#include <type_traits>
5
6
template <class A, class B>
7
class Tuple2 {
8
  typedef Tuple2<A, B> this_type;
9
10
 public:
11
22
  Tuple2(A a, B b) : a_(a), b_(b) {
12
22
  }
_ZN6Tuple2IP6BigStriEC2ES1_i
Line
Count
Source
11
5
  Tuple2(A a, B b) : a_(a), b_(b) {
12
5
  }
_ZN6Tuple2IP6BigStrS1_EC2ES1_S1_
Line
Count
Source
11
5
  Tuple2(A a, B b) : a_(a), b_(b) {
12
5
  }
_ZN6Tuple2IiiEC2Eii
Line
Count
Source
11
8
  Tuple2(A a, B b) : a_(a), b_(b) {
12
8
  }
_ZN6Tuple2IiP6BigStrEC2EiS1_
Line
Count
Source
11
3
  Tuple2(A a, B b) : a_(a), b_(b) {
12
3
  }
_ZN6Tuple2IiPS_IiP6BigStrEEC2EiS3_
Line
Count
Source
11
1
  Tuple2(A a, B b) : a_(a), b_(b) {
12
1
  }
13
14
40
  A at0() {
15
40
    return a_;
16
40
  }
_ZN6Tuple2IP6BigStriE3at0Ev
Line
Count
Source
14
14
  A at0() {
15
14
    return a_;
16
14
  }
_ZN6Tuple2IiiE3at0Ev
Line
Count
Source
14
16
  A at0() {
15
16
    return a_;
16
16
  }
_ZN6Tuple2IP6BigStrS1_E3at0Ev
Line
Count
Source
14
5
  A at0() {
15
5
    return a_;
16
5
  }
_ZN6Tuple2IiP6BigStrE3at0Ev
Line
Count
Source
14
4
  A at0() {
15
4
    return a_;
16
4
  }
_ZN6Tuple2IiPS_IiP6BigStrEE3at0Ev
Line
Count
Source
14
1
  A at0() {
15
1
    return a_;
16
1
  }
17
39
  B at1() {
18
39
    return b_;
19
39
  }
_ZN6Tuple2IP6BigStriE3at1Ev
Line
Count
Source
17
12
  B at1() {
18
12
    return b_;
19
12
  }
_ZN6Tuple2IiiE3at1Ev
Line
Count
Source
17
16
  B at1() {
18
16
    return b_;
19
16
  }
_ZN6Tuple2IP6BigStrS1_E3at1Ev
Line
Count
Source
17
5
  B at1() {
18
5
    return b_;
19
5
  }
_ZN6Tuple2IiP6BigStrE3at1Ev
Line
Count
Source
17
4
  B at1() {
18
4
    return b_;
19
4
  }
_ZN6Tuple2IiPS_IiP6BigStrEE3at1Ev
Line
Count
Source
17
2
  B at1() {
18
2
    return b_;
19
2
  }
20
21
17
  static constexpr ObjHeader obj_header() {
22
17
    return ObjHeader::Tuple(field_mask(), sizeof(this_type));
23
17
  }
_ZN6Tuple2IP6BigStriE10obj_headerEv
Line
Count
Source
21
5
  static constexpr ObjHeader obj_header() {
22
5
    return ObjHeader::Tuple(field_mask(), sizeof(this_type));
23
5
  }
_ZN6Tuple2IiiE10obj_headerEv
Line
Count
Source
21
8
  static constexpr ObjHeader obj_header() {
22
8
    return ObjHeader::Tuple(field_mask(), sizeof(this_type));
23
8
  }
_ZN6Tuple2IiP6BigStrE10obj_headerEv
Line
Count
Source
21
3
  static constexpr ObjHeader obj_header() {
22
3
    return ObjHeader::Tuple(field_mask(), sizeof(this_type));
23
3
  }
_ZN6Tuple2IiPS_IiP6BigStrEE10obj_headerEv
Line
Count
Source
21
1
  static constexpr ObjHeader obj_header() {
22
1
    return ObjHeader::Tuple(field_mask(), sizeof(this_type));
23
1
  }
Unexecuted instantiation: _ZN6Tuple2IP6BigStrS1_E10obj_headerEv
24
25
17
  static constexpr uint32_t field_mask() {
26
17
    return (std::is_pointer<A>() ? maskbit(offsetof(this_type, a_)) : 0) |
27
17
           (std::is_pointer<B>() ? maskbit(offsetof(this_type, b_)) : 0);
28
17
  }
_ZN6Tuple2IP6BigStriE10field_maskEv
Line
Count
Source
25
5
  static constexpr uint32_t field_mask() {
26
5
    return (std::is_pointer<A>() ? maskbit(offsetof(this_type, a_)) : 0) |
27
5
           (std::is_pointer<B>() ? maskbit(offsetof(this_type, b_)) : 0);
28
5
  }
_ZN6Tuple2IiiE10field_maskEv
Line
Count
Source
25
8
  static constexpr uint32_t field_mask() {
26
8
    return (std::is_pointer<A>() ? maskbit(offsetof(this_type, a_)) : 0) |
27
8
           (std::is_pointer<B>() ? maskbit(offsetof(this_type, b_)) : 0);
28
8
  }
_ZN6Tuple2IiP6BigStrE10field_maskEv
Line
Count
Source
25
3
  static constexpr uint32_t field_mask() {
26
3
    return (std::is_pointer<A>() ? maskbit(offsetof(this_type, a_)) : 0) |
27
3
           (std::is_pointer<B>() ? maskbit(offsetof(this_type, b_)) : 0);
28
3
  }
_ZN6Tuple2IiPS_IiP6BigStrEE10field_maskEv
Line
Count
Source
25
1
  static constexpr uint32_t field_mask() {
26
1
    return (std::is_pointer<A>() ? maskbit(offsetof(this_type, a_)) : 0) |
27
1
           (std::is_pointer<B>() ? maskbit(offsetof(this_type, b_)) : 0);
28
1
  }
Unexecuted instantiation: _ZN6Tuple2IP6BigStrS1_E10field_maskEv
29
30
 private:
31
  A a_;
32
  B b_;
33
};
34
35
template <class A, class B, class C>
36
class Tuple3 {
37
  typedef Tuple3<A, B, C> this_type;
38
39
 public:
40
1
  Tuple3(A a, B b, C c) : a_(a), b_(b), c_(c) {
41
1
  }
42
1
  A at0() {
43
1
    return a_;
44
1
  }
45
1
  B at1() {
46
1
    return b_;
47
1
  }
48
1
  C at2() {
49
1
    return c_;
50
1
  }
51
52
1
  static constexpr ObjHeader obj_header() {
53
1
    return ObjHeader::Tuple(field_mask(), sizeof(this_type));
54
1
  }
_ZN6Tuple3IiP6BigStrS1_E10obj_headerEv
Line
Count
Source
52
1
  static constexpr ObjHeader obj_header() {
53
1
    return ObjHeader::Tuple(field_mask(), sizeof(this_type));
54
1
  }
Unexecuted instantiation: _ZN6Tuple3IP6BigStrS1_S1_E10obj_headerEv
55
56
1
  static constexpr uint32_t field_mask() {
57
1
    return (std::is_pointer<A>() ? maskbit(offsetof(this_type, a_)) : 0) |
58
1
           (std::is_pointer<B>() ? maskbit(offsetof(this_type, b_)) : 0) |
59
1
           (std::is_pointer<C>() ? maskbit(offsetof(this_type, c_)) : 0);
60
1
  }
_ZN6Tuple3IiP6BigStrS1_E10field_maskEv
Line
Count
Source
56
1
  static constexpr uint32_t field_mask() {
57
1
    return (std::is_pointer<A>() ? maskbit(offsetof(this_type, a_)) : 0) |
58
1
           (std::is_pointer<B>() ? maskbit(offsetof(this_type, b_)) : 0) |
59
1
           (std::is_pointer<C>() ? maskbit(offsetof(this_type, c_)) : 0);
60
1
  }
Unexecuted instantiation: _ZN6Tuple3IP6BigStrS1_S1_E10field_maskEv
61
62
 private:
63
  A a_;
64
  B b_;
65
  C c_;
66
};
67
68
template <class A, class B, class C, class D>
69
class Tuple4 {
70
  typedef Tuple4<A, B, C, D> this_type;
71
72
 public:
73
1
  Tuple4(A a, B b, C c, D d) : a_(a), b_(b), c_(c), d_(d) {
74
1
  }
75
1
  A at0() {
76
1
    return a_;
77
1
  }
78
1
  B at1() {
79
1
    return b_;
80
1
  }
81
1
  C at2() {
82
1
    return c_;
83
1
  }
84
1
  D at3() {
85
1
    return d_;
86
1
  }
87
88
1
  static constexpr ObjHeader obj_header() {
89
1
    return ObjHeader::Tuple(field_mask(), sizeof(this_type));
90
1
  }
_ZN6Tuple4IiP6BigStrS1_iE10obj_headerEv
Line
Count
Source
88
1
  static constexpr ObjHeader obj_header() {
89
1
    return ObjHeader::Tuple(field_mask(), sizeof(this_type));
90
1
  }
Unexecuted instantiation: _ZN6Tuple4IiiP6BigStrS1_E10obj_headerEv
91
92
1
  static constexpr uint32_t field_mask() {
93
1
    return (std::is_pointer<A>() ? maskbit(offsetof(this_type, a_)) : 0) |
94
1
           (std::is_pointer<B>() ? maskbit(offsetof(this_type, b_)) : 0) |
95
1
           (std::is_pointer<C>() ? maskbit(offsetof(this_type, c_)) : 0) |
96
1
           (std::is_pointer<D>() ? maskbit(offsetof(this_type, d_)) : 0);
97
1
  }
_ZN6Tuple4IiP6BigStrS1_iE10field_maskEv
Line
Count
Source
92
1
  static constexpr uint32_t field_mask() {
93
1
    return (std::is_pointer<A>() ? maskbit(offsetof(this_type, a_)) : 0) |
94
1
           (std::is_pointer<B>() ? maskbit(offsetof(this_type, b_)) : 0) |
95
1
           (std::is_pointer<C>() ? maskbit(offsetof(this_type, c_)) : 0) |
96
1
           (std::is_pointer<D>() ? maskbit(offsetof(this_type, d_)) : 0);
97
1
  }
Unexecuted instantiation: _ZN6Tuple4IiiP6BigStrS1_E10field_maskEv
98
99
 private:
100
  A a_;
101
  B b_;
102
  C c_;
103
  D d_;
104
};
105
106
template <class A, class B, class C, class D, class E>
107
class Tuple5 {
108
  typedef Tuple5<A, B, C, D, E> this_type;
109
110
 public:
111
  Tuple5(A a, B b, C c, D d, E e) : a_(a), b_(b), c_(c), d_(d), e_(e) {
112
  }
113
  A at0() {
114
    return a_;
115
  }
116
  B at1() {
117
    return b_;
118
  }
119
  C at2() {
120
    return c_;
121
  }
122
  D at3() {
123
    return d_;
124
  }
125
  E at4() {
126
    return e_;
127
  }
128
129
  static constexpr ObjHeader obj_header() {
130
    return ObjHeader::Tuple(field_mask(), sizeof(this_type));
131
  }
132
133
  static constexpr uint32_t field_mask() {
134
    return (std::is_pointer<A>() ? maskbit(offsetof(this_type, a_)) : 0) |
135
           (std::is_pointer<B>() ? maskbit(offsetof(this_type, b_)) : 0) |
136
           (std::is_pointer<C>() ? maskbit(offsetof(this_type, c_)) : 0) |
137
           (std::is_pointer<D>() ? maskbit(offsetof(this_type, d_)) : 0) |
138
           (std::is_pointer<E>() ? maskbit(offsetof(this_type, e_)) : 0);
139
  }
140
141
 private:
142
  A a_;
143
  B b_;
144
  C c_;
145
  D d_;
146
  E e_;
147
};
148
149
#endif  // MYCPP_GC_TUPLE_H