Quantcast
Channel: Why is unique_ptr not equality_comparable_with nullptr_t in C++20? - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by Justin for Why is unique_ptr not equality_comparable_with nullptr_t...

TL;DR: std::equality_comparable_with<T, U> requires that both both T and U are convertible to the common reference of T and U. For the case of std::unique_ptr<T> and std::nullptr_t, this...

View Article



Why is unique_ptr not equality_comparable_with nullptr_t in C++20?

Working with C++20's concepts I noticed that std::unique_ptr appears to fail to satisfy the std::equality_comparable_with<std::nullptr_t,...> concept. From std::unique_ptr's definition, it is...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images