On Thu, Feb 13, 2020 at 11:54 AM Vladimir Grigoriev via Std-Discussion <std-discussion@lists.isocpp.org> wrote:
There is ambiguity in the description of inline static data members.
 
On one hand, according to this paragraph in the C++ 20 Standard (11.3.8.2 Static data members)
 
3… An inline static data member may be defined in the class definition and may specify a brace-or-equal-initializer
 
The word «may» is not the same as the word «shall». So it seems this code should be compiled
struct B
{
    static inline int x = 10;
};
int B::x;
 
But compilers say that the data member x is redefined.
 
On the other hand in the mentioned quote there is also written that
If the member is declared with the constexpr specifier, it may be redeclared in namespace scope with no initializer
 
So this code
 
struct B
{
    constexpr static int x = 10;
};
constexpr int B::x;
 
compiles successfully. But as it is said in the Standard constexpr variables are inline variables. So either the first code snippet should compile or the second code snippet shall not be compiled. Or the quote should be rewritten changing for example the word «may» to the word «shall» 
 
With best regards
(Vlad from Moscow) 
--
Std-Discussion mailing list
Std-Discussion@lists.isocpp.org
https://lists.isocpp.org/mailman/listinfo.cgi/std-discussion

I'm a little confused about what the relationship is between the ideas you have written down in your message, but I think I do see your point that the first quotation is confusing. It would be better if it said, "When an inline static data member is declared in the class definition, the declaration is a definition and may specify a brace-or-equal-initializer".  
--
Brian Bi