On 1/18/24 9:08 AM, ஜெய்கணேஷ் குமரன் via Std-Proposals wrote:
inline is only needed if the data member is not declared const.Hello all, Currently, in C++ you must put the inline keyword on to have a static data member with an in-class initialiser.
I reälly find this unnecessary, as it is obvious that the data member needs to be inline to have an in-class initialiser. Current: inline static type s_member = ...; Proposed: static type s_member = ...;Implicitly declaring the static data member inline would break existing code like the following by introducing a redefinition.
struct S {
static const int sdm = 1;
};
const int S::sdm;
--Tom.
Note: I do not have the time to participate in standardisation in order to open formal proposals, but I wish someöne else does based on my ideas. Thanks, Jaiganésh Kumaran.
Std-Proposals mailing list
Std-Proposals@lists.isocpp.org
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals