|
Boost : |
From: Peder Holt (peder.holt_at_[hidden])
Date: 2006-02-10 05:41:21
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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk