我似乎遇到了编译器/库错误的问题。当我尝试
#include <iostream>
#include <type_traits>
#include <memory>
int main()
{
typedef std::unique_ptr<int> T;
std::cout << "is_copy_assignable: "
<< std::is_copy_assignable<T>::value
<< "\n"
<< "is_copy_constructible: "
<< std::is_copy_constructible<T>::value << "\n";
}
使用 Visual Studio 2012 Update 1 我得到
is_copy_assignable: 1
is_copy_constructible: 1
代替
is_copy_assignable: 0
is_copy_constructible: 0
有替代解决方案吗?