Boost logo

Boost :

From: Steven Watanabe (steven_at_[hidden])
Date: 2006-12-22 20:01:40


AMDG

The following hack works with msvc 8.0
It appears that using another specialization
of msvc_extract_type tricks the compiler's filter.

#elif BOOST_WORKAROUND(BOOST_MSVC,==1400)
        struct msvc_extract_type_default_param {};

        template<typename ID, typename T = msvc_extract_type_default_param>
        struct msvc_extract_type;

        template<typename ID>
        struct msvc_extract_type<ID, msvc_extract_type_default_param> {
            template<bool>
            struct id2type_impl;

            typedef id2type_impl<true> id2type;
        };

        template<typename ID, typename T>
        struct msvc_extract_type : msvc_extract_type<ID,
msvc_extract_type_default_param>
        {
            template<>
            struct id2type_impl<true> //VC8.0 specific bugfeature
            {
                typedef T type;
            };
            template<bool>
            struct id2type_impl;

            typedef id2type_impl<true> id2type;
        };

        template<typename T, typename ID>
        struct msvc_register_type : msvc_extract_type<ID, T>
        {
        };
# else ...

In Christ,
Steven Watanabe


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