A7-1-2
: Alert on move constructor declaration that cannot be constexpr
specified
#529
Labels
Difficulty-Low
A false positive or false negative report which is expected to take <1 day effort to address
Impact-Medium
Standard-AUTOSAR
user-report
Issue reported by an end user of CodeQL Coding Standards
Affected rules
A7-1-2
Description
The query alerts on a move constructor declaration outside the class body.
Per
[dcl.constexpr]
paragraph 1, aconstexpr
shall only be applied to the declaration of a function with the additional constraint that all of its declarations shall contain theconstexpr
. When the advice associated with the alert is followed, this results in the compilation error:Example
File:
myclass.hpp
File:
myclass.cpp
The text was updated successfully, but these errors were encountered: