Boost logo

Boost :

From: Reece Dunn (msclrhd_at_[hidden])
Date: 2005-10-22 02:26:25


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


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk