Chris@16: Chris@16: // Copyright Aleksey Gurtovoy 2000-2004 Chris@16: // Chris@16: // Distributed under the Boost Software License, Version 1.0. Chris@16: // (See accompanying file LICENSE_1_0.txt or copy at Chris@16: // http://www.boost.org/LICENSE_1_0.txt) Chris@16: // Chris@16: // See http://www.boost.org/libs/mpl for documentation. Chris@16: Chris@101: // $Id$ Chris@101: // $Date$ Chris@101: // $Revision$ Chris@16: Chris@16: // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! Chris@16: Chris@16: #include Chris@16: Chris@16: // local macros, #undef-ined at the end of the header Chris@16: #define AUX778076_DTW_PARAMS(param) \ Chris@16: BOOST_MPL_PP_PARAMS(AUX778076_MSVC_DTW_ARITY, param) \ Chris@16: /**/ Chris@16: Chris@16: #define AUX778076_DTW_ORIGINAL_NAME \ Chris@16: AUX778076_MSVC_DTW_ORIGINAL_NAME \ Chris@16: /**/ Chris@16: Chris@16: // warning: not a well-formed C++ Chris@16: // workaround for MSVC 6.5's "dependent template typedef bug" Chris@16: Chris@16: template< typename F> Chris@16: struct AUX778076_MSVC_DTW_NAME Chris@16: { Chris@16: template< bool > struct f_ : F {}; Chris@16: template<> struct f_ Chris@16: { Chris@16: #if AUX778076_MSVC_DTW_ARITY > 0 Chris@16: template< AUX778076_DTW_PARAMS(typename P) > struct AUX778076_DTW_ORIGINAL_NAME Chris@16: { Chris@16: typedef int type; Chris@16: }; Chris@16: }; Chris@16: Chris@16: template< AUX778076_DTW_PARAMS(typename T) > struct result_ Chris@16: : f_< aux::msvc_never_true::value > Chris@16: ::template AUX778076_DTW_ORIGINAL_NAME< AUX778076_DTW_PARAMS(T) > Chris@16: { Chris@16: }; Chris@16: #else Chris@16: template< typename P = int > struct AUX778076_DTW_ORIGINAL_NAME Chris@16: { Chris@16: typedef int type; Chris@16: }; Chris@16: }; Chris@16: Chris@16: template< typename T = int > struct result_ Chris@16: : f_< aux::msvc_never_true::value > Chris@16: ::template AUX778076_DTW_ORIGINAL_NAME<> Chris@16: { Chris@16: }; Chris@16: #endif Chris@16: }; Chris@16: Chris@16: #undef AUX778076_DTW_ORIGINAL_NAME Chris@16: #undef AUX778076_DTW_PARAMS Chris@16: Chris@16: #undef AUX778076_MSVC_DTW_NAME Chris@16: #undef AUX778076_MSVC_DTW_ORIGINAL_NAME Chris@16: #undef AUX778076_MSVC_DTW_ARITY