Код: Выделить всё
#include
std::atomic_flag static_flag = ATOMIC_FLAG_INIT; // static initialization,
// guaranteed to be available during dynamic initialization of static objects.
int main()
{
std::atomic_flag automatic_flag = ATOMIC_FLAG_INIT; // guaranteed to work
// std::atomic_flag another_flag(ATOMIC_FLAG_INIT); // unspecified
}
Должны ли мы всегда инициализировать, используя это определение? почему ?
Подробнее здесь: https://stackoverflow.com/questions/575 ... to-be-used
Мобильная версия