NN
Size: a a a
CD
CD
AD
ID
// for bothСмотрел на clang-format, но он, как оказалось, форматирует по всем своим настройкам и не применять их все сразу нельзя.
int abc = 10;
int a = 20;
// and
int abc = 10;
int a = 20;
D
// for bothСмотрел на clang-format, но он, как оказалось, форматирует по всем своим настройкам и не применять их все сразу нельзя.
int abc = 10;
int a = 20;
// and
int abc = 10;
int a = 20;
// clang-format off
your code not to format
// clang-format on
K
ID
ID
DV
T has a member (without a default member initializer) (since C++11) which has a deleted default constructor, or its default constructor is ambiguous or inaccessible from this constructor.Так что MSVC не прав.
T is a union with at least one variant member with non-trivial default constructor, and no variant member of T has a default member initializer.
На странице про юнионы такое:If a union contains a non-static data member with a non-trivial default constructor, the default constructor of the union is deleted by default unless a variant member of the union has a default member initializer
CD
T is a union with at least one variant member with non-trivial default constructor, and no variant member of T has a default member initializer.
На странице про юнионы такое:If a union contains a non-static data member with a non-trivial default constructor, the default constructor of the union is deleted by default unless a variant member of the union has a default member initializer
A defaulted default constructor for class X is defined as deleted if:
any potentially constructed subobject, except for a non-static data member with a brace-or-equal-initializer, has class type M (or array thereof) and either M has no default constructor
For a class, its non-static data members, its non-virtual direct base classes, and, if the class is not abstract ([class.abstract]), its virtual base classes are called its potentially constructed subobjects.
DV
A defaulted default constructor for class X is defined as deleted if:
any potentially constructed subobject, except for a non-static data member with a brace-or-equal-initializer, has class type M (or array thereof) and either M has no default constructor
For a class, its non-static data members, its non-virtual direct base classes, and, if the class is not abstract ([class.abstract]), its virtual base classes are called its potentially constructed subobjects.
CD
ЕБ
ЕБ
ID