Why is_copy_constructible_v<vector<unique_ptr<int>>> is true, but it cannot be copied?

Viewed 40
using T = std::vector<std::unique_ptr<int>>;

Why std::is_copy_constructible<T> is true, but following does not compile:

using T = vector<unique_ptr<int>>;

T v1;
T v2 = v1;

(It does not compile in Clang, GCC and MSVC with C++17.)

0 Answers
Related