File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
cpp/autosar/test/rules/A5-1-1 Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -104,8 +104,22 @@ template <typename T, int size> struct S2 {
104104 T m2[4 ]; // NON_COMPLIANT
105105};
106106
107+ template <typename T, T val> struct S3 {
108+ static constexpr T value = val; // COMPLIANT;
109+ };
110+
107111void test_fp_reported_in_371 () {
108112 struct S2 <int , 1 > l1; // COMPLIANT
109113 struct S2 <int , g1> l2; // COMPLIANT
110114 struct S2 <int , f1()> l3; // COMPLIANT
115+
116+ S3<char16_t , u' \u03c0 ' > l4; // COMPLIANT
117+ S3<char16_t , S3<char16_t , u' \u2286 ' >::value> l5; // COMPLIANT
118+ S3<char32_t , U' 🌌' > l6; // COMPLIANT
119+ S3<char32_t , S3<char32_t , U' ⭐' >::value> l7; // COMPLIANT
120+
121+ constexpr float l8 = 3 .14159f ;
122+ #define delta 0 .1f
123+ for (float i = 0 .0f ; i < l8; i += delta) { // COMPLIANT
124+ }
111125}
You can’t perform that action at this time.
0 commit comments