为什么std :: is_copy_constructible不能按预期工作?

时间:2013-09-24 03:47:00

标签: c++ visual-c++ c++11 typetraits

我的编译器是VC ++ 2013 RC。

#include <type_traits>

struct A
{
    A() = default;
    A(const A&) = delete;
};

int main()
{
    auto b = std::is_copy_constructible<A>::value;
    // Now b is TRUE! Rather than false.
}

这是VC ++ 2013 RC的一大难题吗?

更新

ideone给出相关结果。

1 个答案:

答案 0 :(得分:1)

这应该是Visual C ++ 2013中的一个错误。根据their website=delete=default将在RTM版本中实现,因此令人惊讶的是RC不正确评估它。如果以前没有提到过,你可以查看他们的bug database并提交新文件。