| 113 | |
| 114 | // A class that has *both* subscripting and named members |
| 115 | template <typename T> struct ComboVec3 |
| 116 | { |
| 117 | union |
| 118 | { |
| 119 | T elements[3]; |
| 120 | struct |
| 121 | { |
| 122 | T x, y, z; |
| 123 | }; |
| 124 | }; |
| 125 | |
| 126 | ComboVec3 (T val = T (0)) : x (val), y (val), z (val) {} |
| 127 | ~ComboVec3 () = default; |
| 128 | constexpr T operator[] (int i) const { return elements[i]; } |
| 129 | T& operator[] (int i) { return elements[i]; } |
| 130 | }; |
| 131 | |
| 132 | // A class that has *both* subscripting and named members |
| 133 | template <typename T> struct ComboVec4 |
nothing calls this directly
no outgoing calls
no test coverage detected