型特性は、次のようなケースを処理std::vector < std::unique_ptr <int> >
し、それがコピー構築可能でないことを検出できる必要がありますか?
https://ideone.com/gbcRUaの例を次に示します(g++ 4.8.1 を実行)
#include <type_traits>
#include <vector>
#include <iostream>
#include <memory>
int main()
{
// This prints 1, implying that it's copy constructible, when it's clearly not
std::cout << std::is_copy_constructible< std::vector<std::unique_ptr<int> > >::value << std::endl;
return 0;
}
これが の正しい動作である場合is_copy_constructible
、コピーの構成が不適切であることを検出する方法はありますか? まあ、コンパイルに失敗するだけではありません。