What’s the difference between static constexpr and static inline variables in C++17?
You don’t have to specify an initializer for mySecondVar at the point of declaration. Nor is the initializer required to be constexpr itself. This means that if we attempt to define myFirstVar like this: class MyClass { static constexpr int myFirstVar; }; int MyClass::myFirstVar = 1; Or like this: #include <cstdlib> class MyClass { static … Read more