How does C17 want me to initialize my atoms?

The C17 standard depreciates ATOMIC_VAR_INITfrom stdatomic.h, which means that it still supports it, but rather will not be used. What is the correct non-obsolete way to initialize atomicity in C17?

Same as non-atomic types:

atomic_int foo = 42;

Or something new?

+4
source share

Source: https://habr.com/ru/post/1693771/


All Articles