diff options
Diffstat (limited to 'boost/python/detail/destroy.hpp')
-rw-r--r-- | boost/python/detail/destroy.hpp | 49 |
1 files changed, 3 insertions, 46 deletions
diff --git a/boost/python/detail/destroy.hpp b/boost/python/detail/destroy.hpp index 0172dca28f..3ea6455330 100644 --- a/boost/python/detail/destroy.hpp +++ b/boost/python/detail/destroy.hpp @@ -7,25 +7,12 @@ # include <boost/type_traits/is_array.hpp> # include <boost/detail/workaround.hpp> -# if BOOST_WORKAROUND(BOOST_MSVC, == 1300) -# include <boost/type_traits/is_enum.hpp> -# endif namespace boost { namespace python { namespace detail { -template < - bool array -# if BOOST_WORKAROUND(BOOST_MSVC, == 1300) - , bool enum_ // vc7 has a problem destroying enums -# endif - > struct value_destroyer; +template <bool array> struct value_destroyer; template <> -struct value_destroyer< - false -# if BOOST_WORKAROUND(BOOST_MSVC, == 1300) - , false -# endif - > +struct value_destroyer<false> { template <class T> static void execute(T const volatile* p) @@ -35,12 +22,7 @@ struct value_destroyer< }; template <> -struct value_destroyer< - true -# if BOOST_WORKAROUND(BOOST_MSVC, == 1300) - , false -# endif - > +struct value_destroyer<true> { template <class A, class T> static void execute(A*, T const volatile* const first) @@ -49,9 +31,6 @@ struct value_destroyer< { value_destroyer< boost::is_array<T>::value -# if BOOST_WORKAROUND(BOOST_MSVC, == 1300) - , boost::is_enum<T>::value -# endif >::execute(p); } } @@ -63,25 +42,6 @@ struct value_destroyer< } }; -# if BOOST_WORKAROUND(BOOST_MSVC, == 1300) -template <> -struct value_destroyer<true,true> -{ - template <class T> - static void execute(T const volatile*) - { - } -}; - -template <> -struct value_destroyer<false,true> -{ - template <class T> - static void execute(T const volatile*) - { - } -}; -# endif template <class T> inline void destroy_referent_impl(void* p, T& (*)()) { @@ -89,9 +49,6 @@ inline void destroy_referent_impl(void* p, T& (*)()) // must come *before* T for metrowerks value_destroyer< (boost::is_array<T>::value) -# if BOOST_WORKAROUND(BOOST_MSVC, == 1300) - , (boost::is_enum<T>::value) -# endif >::execute((const volatile T*)p); } |