Namespaces
Variants
Views
Actions

ATOMIC_FLAG_INIT

From cppreference.com
< cpp‎ | atomic
Revision as of 17:50, 31 May 2013 by P12bot (Talk | contribs)

 
 
 
Defined in header <atomic>
#define ATOMIC_FLAG_INIT /* implementation-defined */

Defines the expression which can be used to initialize std::atomic_flag to clear state. If the flag has static storage duration, this initialization is static.

Example

#include <atomic>
 
std::atomic_flag static_flag = ATOMIC_FLAG_INIT;
 
int main()
{
    std::atomic_flag automatic_flag = ATOMIC_FLAG_INIT;
    std::atomic_flag another_flag(ATOMIC_FLAG_INIT);
}

See also

Template:cpp/atomic/dcl list atomic flag