C++ why the type of parameter of atomic_load is pointer instead of reference?

Viewed 692

I agree the answer in When to use references vs. pointers.
But, I am wondering why C++ defines atomic_load as

template<class T>
T atomic_load(const std::atomic<T> *obj) noexcept;
                                   ^

instead of

template<class T>
T atomic_load(const std::atomic<T> &obj) noexcept;
                                   ^

Can anyone help me?

1 Answers
Related