File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
cpp/autosar/src/rules/A5-1-1 Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 53
53
not l = any ( ArrayOrVectorAggregateLiteral aal ) .getAnElementExpr ( _) .getAChild * ( ) and
54
54
// Ignore x - 1 expressions
55
55
not exists ( SubExpr se | se .getRightOperand ( ) = l and l .getValue ( ) = "1" ) and
56
+ // Exclude compile time computed integral literals as they can appear as integral literals
57
+ // when used as non-type template arguments.
58
+ // We limit ourselves to integral literals, because floating point literals as non-type
59
+ // template arguments are not supported in C++ 14. Those are supported shince C++ 20.
56
60
not l instanceof CompileTimeComputedIntegralLiteral and
57
61
// Exclude literals to instantiate a class template per example in the standard
58
62
// where an type of std::array is intialized with size 5.
You can’t perform that action at this time.
0 commit comments