This commit is contained in:
2025-10-25 03:02:53 +03:00
commit 043225d523
3416 changed files with 681196 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
[depr.static.constexpr]
# Annex D (normative) Compatibility features [[depr]](./#depr)
## D.7 Redeclaration of static constexpr data members [depr.static.constexpr]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L148)
For compatibility with prior revisions of C++, a constexpr static data member may be redundantly redeclared outside the class with no
initializer ([[basic.def]](basic.def "6.2Declarations and definitions"), [[class.static.data]](class.static.data "11.4.9.3Static data members"))[.](#1.sentence-1)
This usage is deprecated[.](#1.sentence-2)
[*Example [1](#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*]