1

I am confused about:

cout << is_copy_constructible<int>::value
     << is_copy_constructible<unique_ptr<int>>::value
     << is_copy_constructible<vector<unique_ptr<int>>>::value;

I expected 100, but got 101 with gcc 4.9.1 and clang 3.4.2

How can vector<unique_ptr> be copy constructible (or assignable for that matter) while keeping correct unique_ptr semantics?

idefixs
  • 712
  • 1
  • 4
  • 14
  • http://stackoverflow.com/questions/25803403/stdunordered-mapt-stdunique-ptru-copyable-gcc-bug/25803813#25803813 – T.C. Oct 05 '14 at 10:59
  • Or: http://stackoverflow.com/questions/18404108/issue-with-is-copy-constructible – Marco A. Oct 05 '14 at 10:59

0 Answers0