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.
2 parents 13ec1e6 + 49d9f06 commit 9af0458Copy full SHA for 9af0458
docs/code-quality/c26497.md
@@ -8,7 +8,7 @@ description: CppCoreCheck rule that enforces C++ Core Guidelines F.4
8
---
9
# C26497 USE_CONSTEXPR_FOR_FUNCTION
10
11
-This function %function% could be marked `constexpr` if compile-time evaluation is desired (f.4).
+> This function *function-name* could be marked `constexpr` if compile-time evaluation is desired (f.4).
12
13
## See also
14
@@ -24,3 +24,12 @@ void function1() noexcept
24
const int theAnswer = GetTheAnswer(0);
25
}
26
```
27
+
28
+To reduce code analysis noise on new code, this warning isn't issued if the function has an empty implementation.
29
30
+```cpp
31
+int function1(){ // no C26497
32
+ return 1;
33
+}
34
+void function2(){} // no C26497
35
+```
0 commit comments