VC 7.0 ETI fix

[SVN r20801]
This commit is contained in:
Aleksey Gurtovoy
2003-11-13 11:53:32 +00:00
parent fc43895f9e
commit 5a8aba52c9

View File

@@ -3,7 +3,7 @@
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2001-02
// Copyright (c) 2001-03
// Aleksey Gurtovoy
//
// Permission to use, copy, modify, distribute and sell this software
@@ -17,14 +17,16 @@
#ifndef BOOST_MPL_AUX_DEREF_WNKD_HPP_INCLUDED
#define BOOST_MPL_AUX_DEREF_WNKD_HPP_INCLUDED
#include "boost/mpl/aux_/is_msvc_eti_arg.hpp"
#include "boost/mpl/aux_/config/eti.hpp"
#if defined(BOOST_MPL_MSVC_ETI_BUG)
namespace boost { namespace mpl { namespace aux {
template< typename Iterator >
struct deref_wknd
# if defined(BOOST_MPL_MSVC_60_ETI_BUG)
template< typename Iterator > struct deref_wknd
{
typedef typename Iterator::type type;
};
@@ -34,6 +36,32 @@ template<> struct deref_wknd<int>
typedef int type;
};
# else
template< bool > struct deref_wknd_impl
{
template< typename Iterator > struct result_
{
typedef typename Iterator::type type;
};
};
template<> struct deref_wknd_impl<false>
{
template< typename Iterator > struct result_
{
typedef int type;
};
};
template< typename Iterator > struct deref_wknd
: deref_wknd_impl< !aux::is_msvc_eti_arg<Iterator>::value >
::template result_<Iterator>
{
};
# endif // BOOST_MPL_MSVC_60_ETI_BUG
}}} // namespace boost::mpl::aux
# define BOOST_MPL_AUX_DEREF_WNKD(iter) ::boost::mpl::aux::deref_wknd<iter>::type
@@ -42,6 +70,6 @@ template<> struct deref_wknd<int>
# define BOOST_MPL_AUX_DEREF_WNKD(iter) iter::type
#endif
#endif // BOOST_MPL_MSVC_ETI_BUG
#endif // BOOST_MPL_AUX_DEREF_WNKD_HPP_INCLUDED