Boost logo

Boost :

From: Peder Holt (peder.holt_at_[hidden])
Date: 2006-12-23 04:30:02


2006/12/23, Steven Watanabe <steven_at_[hidden]>:
> AMDG
>
> The following hack works with msvc 8.0
> It appears that using another specialization
> of msvc_extract_type tricks the compiler's filter.

Wow! Great job!
This passed all our tests, so I added it to HEAD.
I wonder if other compilers (e.g. Borland) can be tricked in the same way...

Regards
Peder

>
> #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
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>


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