AF
Size: a a a
AF
АР
АР
АР
OL
AF
AN
АР
АК
АР
ID
template<typename T>
struct Test { int a = 10; };
struct Intspec { int b = 11; };
struct Floatspec { int c = 12; };
template<> struct Test<int> : Intspec {};
template<> struct Test<float> : Floatspec {};
int main()
{
auto a = Test<std::string>{};
auto b = Test<int>{};
auto c = Test<float>{};
std::cout << a.a << b.b << c.c << std::endl;
return 0;
}
D
template<typename T>
struct Test { int a = 10; };
struct Intspec { int b = 11; };
struct Floatspec { int c = 12; };
template<> struct Test<int> : Intspec {};
template<> struct Test<float> : Floatspec {};
int main()
{
auto a = Test<std::string>{};
auto b = Test<int>{};
auto c = Test<float>{};
std::cout << a.a << b.b << c.c << std::endl;
return 0;
}
AF
template<typename T>
struct Test { int a = 10; };
struct Intspec { int b = 11; };
struct Floatspec { int c = 12; };
template<> struct Test<int> : Intspec {};
template<> struct Test<float> : Floatspec {};
int main()
{
auto a = Test<std::string>{};
auto b = Test<int>{};
auto c = Test<float>{};
std::cout << a.a << b.b << c.c << std::endl;
return 0;
}
AF
ID
D
template<typename T>
struct Test { int a = 10; };
struct Intspec { int b = 11; };
struct Floatspec { int c = 12; };
template<> struct Test<int> : Intspec {};
template<> struct Test<float> : Floatspec {};
int main()
{
auto a = Test<std::string>{};
auto b = Test<int>{};
auto c = Test<float>{};
std::cout << a.a << b.b << c.c << std::endl;
return 0;
}
AS
AF
m
insert_or_assign
для кейсов, когда конструирование value дешевое.