Dear Maintainer,
The following C++20 code can be compiled with GCC 12.3 or later but can't be compiled on Debian 12 with GCC 12.2:
```
#include <atomic>
#include <memory>
class A{ int a; };
int main()
{
std::atomic<std::shared_ptr<A>> a_ptr = std::make_shared<A>();
a_ptr = nullptr;
return 0;
}
```
Error Messages:
```
test.cpp: In function ‘int main()’:
test.cpp:9:13: error: ambiguous overload for ‘operator=’ (operand types are ‘std::atomic<std::shared_ptr<A> >’ and ‘std::nullptr_t’)
9 | a_ptr = nullptr;
| ^~~~~~~
In file included from /usr/include/c++/12/memory:78,
from test.cpp:2:
/usr/include/c++/12/bits/shared_ptr_atomic.h:585:12: note: candidate: ‘void std::atomic<std::shared_ptr<_Tp> >::operator=(const std::atomic<std::shared_ptr<_Tp> >&) [with _Tp = A]’ (deleted)
585 | void operator=(const atomic&) = delete;
| ^~~~~~~~
/usr/include/c++/12/bits/shared_ptr_atomic.h:600:7: note: candidate: ‘void std::atomic<std::shared_ptr<_Tp> >::operator=(std::shared_ptr<_Tp>) [with _Tp = A]’
600 | operator=(shared_ptr<_Tp> __desired) noexcept
| ^~~~~~~~
```
This may be a bug of GCC 12.2, please upgrade GCC version of Debian 12.