Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51681 - trunk/boost/typeof/msvc
From: peder.holt_at_[hidden]
Date: 2009-03-10 05:33:22


Author: burbelgruff
Date: 2009-03-10 05:33:21 EDT (Tue, 10 Mar 2009)
New Revision: 51681
URL: http://svn.boost.org/trac/boost/changeset/51681

Log:
Removed use of typeid in typeof implementation for VC7.1, as this caused problems in some uses of BOOST_TYPEOF
Text files modified:
   trunk/boost/typeof/msvc/typeof_impl.hpp | 52 ----------------------------------------
   1 files changed, 0 insertions(+), 52 deletions(-)

Modified: trunk/boost/typeof/msvc/typeof_impl.hpp
==============================================================================
--- trunk/boost/typeof/msvc/typeof_impl.hpp (original)
+++ trunk/boost/typeof/msvc/typeof_impl.hpp 2009-03-10 05:33:21 EDT (Tue, 10 Mar 2009)
@@ -153,58 +153,7 @@
             };
         };
 # endif
-# if BOOST_WORKAROUND(BOOST_MSVC,==1310)
- template<const std::type_info& ref_type_info>
- struct msvc_typeid_wrapper {
- typedef typename msvc_extract_type<msvc_typeid_wrapper>::id2type id2type;
- typedef typename id2type::type wrapped_type;
- typedef typename wrapped_type::type type;
- };
- //This class is used for registering the type T. encode_type<T> is mapped against typeid(encode_type<T>).
- //msvc_typeid_wrapper<typeid(encode_type<T>)> will now have a type typedef that equals encode_type<T>.
- template<typename T>
- struct encode_type
- {
- typedef encode_type<T> input_type;
- //Invoke registration of encode_type<T>. typeid(encode_type<T>) is now mapped to encode_type<T>. Do not use registered_type for anything.
- //The reason for registering encode_type<T> rather than T, is that VC handles typeid(function reference) poorly. By adding another
- //level of indirection, we solve this problem.
- typedef typename msvc_register_type<input_type,msvc_typeid_wrapper<typeid(input_type)> >::id2type registered_type;
- typedef T type;
- };
-
- template<typename T> typename disable_if<
- typename is_function<T>::type,
- typename encode_type<T>::input_type>::type encode_start(T const&);
-
- template<typename T> typename enable_if<
- typename is_function<T>::type,
- typename encode_type<T>::input_type>::type encode_start(T&);
 
- template<typename Organizer, typename T>
- msvc_register_type<T,Organizer> typeof_register_type(const T&);
-
-
-# define BOOST_TYPEOF(expr) \
- boost::type_of::msvc_typeid_wrapper<typeid(boost::type_of::encode_start(expr))>::type
-
-# define BOOST_TYPEOF_TPL(expr) typename BOOST_TYPEOF(expr)
-
-# define BOOST_TYPEOF_NESTED_TYPEDEF_TPL(name,expr) \
-struct name {\
- enum {_typeof_register_value=sizeof(typeid(boost::type_of::typeof_register_type<name>(expr)))};\
- typedef typename boost::type_of::msvc_extract_type<name>::id2type id2type;\
- typedef typename id2type::type type;\
-};
-
-# define BOOST_TYPEOF_NESTED_TYPEDEF(name,expr) \
-struct name {\
- enum {_typeof_register_value=sizeof(typeid(boost::type_of::typeof_register_type<name>(expr)))};\
- typedef boost::type_of::msvc_extract_type<name>::id2type id2type;\
- typedef id2type::type type;\
-};
-
-# else
         template<int ID>
         struct msvc_typeid_wrapper {
             typedef typename msvc_extract_type<mpl::int_<ID> >::id2type id2type;
@@ -274,7 +223,6 @@
         typedef id2type::type type;\
     };
 
-#endif
     }
 }
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk