|
Boost-Commit : |
From: peder.holt_at_[hidden]
Date: 2007-12-20 07:04:40
Author: burbelgruff
Date: 2007-12-20 07:04:40 EST (Thu, 20 Dec 2007)
New Revision: 42200
URL: http://svn.boost.org/trac/boost/changeset/42200
Log:
Merged from trunk: for visual studio 8 and visual studio 9, reverted to using sizeof in 'native' typeof operator as the use of typeid caused compilation error in visual studio source code analysis.
Text files modified:
branches/release/boost/typeof/msvc/typeof_impl.hpp | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
Modified: branches/release/boost/typeof/msvc/typeof_impl.hpp
==============================================================================
--- branches/release/boost/typeof/msvc/typeof_impl.hpp (original)
+++ branches/release/boost/typeof/msvc/typeof_impl.hpp 2007-12-20 07:04:40 EST (Thu, 20 Dec 2007)
@@ -153,7 +153,7 @@
};
};
# endif
-# if BOOST_WORKAROUND(BOOST_MSVC,>=1310)
+# 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;
@@ -184,6 +184,7 @@
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
@@ -239,10 +240,18 @@
{
typedef char(*type)[encode_type<T>::value];
};
+# if BOOST_WORKAROUND(BOOST_MSVC,>=1310)
+ template<typename T> typename disable_if<
+ typename is_function<T>::type,
+ typename sizer<T>::type>::type encode_start(T const&);
+ template<typename T> typename enable_if<
+ typename is_function<T>::type,
+ typename sizer<T>::type>::type encode_start(T&);
+# else
template<typename T>
typename sizer<T>::type encode_start(T const&);
-
+# endif
template<typename Organizer, typename T>
msvc_register_type<T,Organizer> typeof_register_type(const T&,Organizer* =0);
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