File tree Expand file tree Collapse file tree 1 file changed +32
-1
lines changed
cpp/autosar/test/rules/M14-6-1 Expand file tree Collapse file tree 1 file changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -35,4 +35,35 @@ void f() {
35
35
A<int > a;
36
36
a.m1 ();
37
37
a.m2 ();
38
- }
38
+ }
39
+
40
+ class D {
41
+ public:
42
+ typedef int TYPE;
43
+ void g ();
44
+ void g (int x);
45
+ static void sg ();
46
+ static void sg (int x);
47
+ int m;
48
+ };
49
+
50
+ class C : D {
51
+ public:
52
+ void m1 () {
53
+ m = 0 ; // COMPLIANT - does not apply to non-class templates
54
+ g (); // COMPLIANT - does not apply to non-class templates
55
+ sg (); // COMPLIANT - does not apply to non-class templates
56
+ TYPE t = 0 ; // COMPLIANT - does not apply to non-class templates
57
+ // void (*p)() = &g; // NON_COMPILABLE
58
+ }
59
+ };
60
+
61
+ template <typename t> class E : D {
62
+ public:
63
+ void m1 () {
64
+ m = 0 ; // COMPLIANT - does not apply to non dependent base types
65
+ g (); // COMPLIANT - does not apply to non dependent base types
66
+ TYPE t = 0 ; // COMPLIANT - does not apply to non dependent base types
67
+ void (*p)() = &g; // COMPLIANT - does not apply to non dependent base types
68
+ }
69
+ };
You can’t perform that action at this time.
0 commit comments