# std::atomic_flag::operator=

> C++ Atlas: `cppatlas.com/w/cpp/atomic/atomic_flag/operator=` | Source: https://en.cppreference.com/w/cpp/atomic/atomic_flag/operator= | Domain: atomic | Standards: C++11

std::atomic_flag is not assignable, its assignment operators are deleted.

## Official Specification Summary (cppreference)

```cpp
// Defined in header <atomic>
atomic_flag& operator=( const atomic_flag& ) = delete; // (1) (since C++11)
atomic_flag& operator=( const atomic_flag& ) volatile = delete; // (2) (since C++11)
```

`std::atomic_flag` is not assignable, its assignment operators are deleted.

---
Attribution: content from https://en.cppreference.com/w/cpp/atomic/atomic_flag/operator= (cppreference.com), licensed under CC-BY-SA 3.0 and GFDL. Modified: converted to markdown, study notes added. Offline snapshot of 9 February 2025.