I have the next isolated test fragment inside an iOS project:

```
/// ...
std::atomic_bool ab;
ab.store(true);
bool expected = false;
while (!ab.compare_exchange_weak(expected, true));
assert(0);
// ...

```

Provided that `ab` is not modified by other threads, I expected, that the loop would be infinite, but after executing I found out that the `assert` is failing. Why is that happening?