Annex D (normative)
Compatibility features
[depr]
D.7
Redeclaration of
static constexpr
data members
[depr.static.constexpr]
1
#
For compatibility with prior revisions of C++, a
constexpr
static data member may be redundantly redeclared outside the class with no initializer
.
This usage is deprecated
.
[
Example
1
:
struct
A
{
static
constexpr
int
n
=
5
;
// definition (declaration in C++ 2014)
}
;
constexpr
int
A
::
n;
// redundant declaration (definition in C++ 2014)
—
end example
]