
10 Feb
2006
10 Feb
'06
10:41 a.m.
is_const and is_volatile fails to detect const and volatile arrays on VC7.1 The following code prints "Success" in VC6.5 and VC8, but "Failure" in VC7.1 #include <iostream> #include <boost/type_traits.hpp> void test(boost::mpl::true_) { std::cout<< "Success" << std::endl; } void test(boost::mpl::false_) { std::cout << "Failure" << std::endl; } int main() { boost::is_const<int const[2]>::type const_; boost::is_volatile<int volatile[2]>::type volatile_; test(const_); test(volatile_); return 0; } Regards, Peder