We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2029a18 commit c8df15fCopy full SHA for c8df15f
cpp/autosar/test/rules/M9-3-3/test.cpp
@@ -161,3 +161,29 @@ class Z22 : Z1 {
161
void f2() final {} // COMPLIANT
162
void f3() { this->a = 100; } // COMPLIANT
163
};
164
+
165
+template <class T> class Array {
166
+public:
167
+ T &back();
168
169
+private:
170
+ T data[128];
171
+ unsigned int size;
172
+};
173
174
+template <class T, template <class...> class U> class Stack {
175
176
+ T &Top() {
177
+ return this->data.back();
178
+ } // Likely NON_COMPLIANT, but cannot be determined until instantiation.
179
180
+ U<T> data;
181
182
183
+using IntVectorStack = Stack<int, Array>;
184
185
+void test_template() {
186
+ IntVectorStack s;
187
188
+ int i = s.Top();
189
+}
0 commit comments