标签: c++ templates boost boost-mpl
我似乎无法看到boost::is_same和boost::mpl::same_as之间的区别。有人可能会指出这些,并且只能使用特定的变体。
boost::is_same
boost::mpl::same_as
答案 0 :(得分:2)
实际上,没有。如果您实际查看mpl::same_as的{{3}},则其中包含is_same,然后直接使用它。
mpl::same_as
is_same
请注意,<type_traits>是C ++ 11标准库的一部分,包含std::is_same(与boost中的上述两个函数完全相同)。
<type_traits>
std::is_same