для внутренних типов (например, int, int64_t и т. Д.) Поведение: < /p>
Код: Выделить всё
#include
#include
#include
struct MyStruct {
int a;
int64_t b;
};
template
struct TAtomicWrapper {
using AtomicType = std::atomic;
};
int main() {
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79757756/why-is-stdatomict-larger-than-t-itself-for-user-defined-structs-on-msvc-but[/url]
Мобильная версия