
Andy Little wrote:
Hi,
using VC7.1... In the following the output is 0, whereas it should be 1 . However commenting out either of the first 2 headers makes result correct.
Can anyone repeat this in VC7.1? -------------
#include <boost/mpl/modulus.hpp> #include <boost/mpl/apply.hpp>
#include <boost/mpl/has_xxx.hpp> #include <iostream>
namespace my{
template<typename T> struct X{ typedef int tag; }; BOOST_MPL_HAS_XXX_TRAIT_DEF(tag); } int main() { std::cout << my::has_tag<my::X<int> >::value << '\n'; } ---------------
I have verified the problem with msvc-7.1, msvc-8.0 and borland-5.5. The code doesn't produce a problem on cw-9.2. I have verified commenting out either of the first headers on msvc-7.1 and msvc-8.0. borland-5.5 still produces 0. - Reece