diff --git a/include/boost/typeof/lvalue_typeof.hpp b/include/boost/typeof/lvalue_typeof.hpp index 6f04007..9b9f778 100644 --- a/include/boost/typeof/lvalue_typeof.hpp +++ b/include/boost/typeof/lvalue_typeof.hpp @@ -7,7 +7,6 @@ #define BOOST_TYPEOF_LVALUE_TYPEOF_HPP_INCLUDED #include -#include namespace boost { @@ -77,26 +76,7 @@ namespace boost // Since this is always a type, // just add "typename" when using in templates -#if defined BOOST_TYPEOF_COMPLIANT || (defined(BOOST_TYPEOF_NATIVE) && defined(BOOST_MSVC)) -namespace boost { namespace type_of { - - template - struct decorate_decode_begin - { - typedef typename decorate_type< - typename V::type, - n - >::type type; - }; -}} - -#define BOOST_LVALUE_TYPEOF(expr) \ - boost::type_of::decorate_decode_begin< \ - BOOST_TYPEOF_NO_TYPE(expr), \ - sizeof(*boost::type_of::classify_expression(expr)) \ - >::type - -#else //BOOST_TYPEOF_NATIVE +#ifndef BOOST_TYPEOF_COMPLIANT #define BOOST_LVALUE_TYPEOF(expr) \ boost::type_of::decorate_type< \ @@ -104,6 +84,28 @@ namespace boost { namespace type_of { sizeof(*boost::type_of::classify_expression(expr)) \ >::type +#else //BOOST_TYPEOF_COMPLIANT + +#include + +namespace boost { namespace type_of { + + template + struct decorate_decode_begin + { + typedef typename decorate_type< + typename decode_begin::type, + n + >::type type; + }; +}} + +#define BOOST_LVALUE_TYPEOF(expr) \ + boost::type_of::decorate_decode_begin< \ + BOOST_TYPEOF_ENCODED_VECTOR(expr), \ + sizeof(*boost::type_of::classify_expression(expr)) \ + >::type + #endif -#endif//BOOST_TYPEOF_LVALUE_TYPEOF_HPP_INCLUDED +#endif//BOOST_TYPEOF_LVALUE_TYPEOF_HPP_INCLUDED \ No newline at end of file diff --git a/include/boost/typeof/msvc/typeof_impl.hpp b/include/boost/typeof/msvc/typeof_impl.hpp index b57d210..1769181 100644 --- a/include/boost/typeof/msvc/typeof_impl.hpp +++ b/include/boost/typeof/msvc/typeof_impl.hpp @@ -148,11 +148,8 @@ namespace boost } } -# define BOOST_TYPEOF_NO_TYPE(expr) \ - boost::type_of::msvc_typeid_wrapper - # define BOOST_TYPEOF(expr) \ - BOOST_TYPEOF_NO_TYPE(expr)::type + boost::type_of::msvc_typeid_wrapper::type # define BOOST_TYPEOF_TPL(expr) typename BOOST_TYPEOF(expr) diff --git a/include/boost/typeof/typeof.hpp b/include/boost/typeof/typeof.hpp index 1523f91..4429a6c 100755 --- a/include/boost/typeof/typeof.hpp +++ b/include/boost/typeof/typeof.hpp @@ -47,7 +47,6 @@ # define BOOST_TYPEOF_TPL BOOST_TYPEOF - #endif // auto diff --git a/include/boost/typeof/typeof_impl.hpp b/include/boost/typeof/typeof_impl.hpp index cdaaa28..873d0ed 100644 --- a/include/boost/typeof/typeof_impl.hpp +++ b/include/boost/typeof/typeof_impl.hpp @@ -51,9 +51,8 @@ namespace boost { namespace type_of { BOOST_PP_ENUM(BOOST_TYPEOF_LIMIT_SIZE, BOOST_TYPEOF_TYPEITEM, Expr) \ > -#define BOOST_TYPEOF_NO_TYPE(Expr)\ - boost::type_of::decode_begin -#define BOOST_TYPEOF(Expr) BOOST_TYPEOF_NO_TYPE(Expr)::type +#define BOOST_TYPEOF(Expr)\ + boost::type_of::decode_begin::type #define BOOST_TYPEOF_TPL typename BOOST_TYPEOF