Atomic flag spin lock

Which std::atomic_flag method is used to atomically set the flag and return its previous value?

A

fetch_or(1)

B

test_and_set()

C

set()

D

exchange(true)