Skip to content

Commit 65f8e27

Browse files
authored
virtual functions can be constexpr
1 parent b47a245 commit 65f8e27

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/cpp/constexpr-cpp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ The following rules apply to constexpr functions:
6161
6262
- A **`constexpr`** function can be recursive.
6363
64-
- It can't be [virtual](../cpp/virtual-cpp.md). A constructor can't be defined as **`constexpr`** when the enclosing class has any virtual base classes.
64+
- Before C++20 it couldn't be [virtual](../cpp/virtual-cpp.md). A constructor couldn't be defined as **`constexpr`** when the enclosing class had any virtual base classes. Visual C++ supports **`constexpr`** virtual functions since Visual Studio 2019 16.11.
6565
6666
- The body can be defined as `= default` or `= delete`.
6767

0 commit comments

Comments
 (0)