forked from boostorg/typeof
Reverted changes to lvalue_typeof. (Removing BOOST_TYPEOF_NO_TYPE)
[SVN r2616]
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
#define BOOST_TYPEOF_LVALUE_TYPEOF_HPP_INCLUDED
|
||||
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/typeof/typeof.hpp>
|
||||
|
||||
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<class V, int n>
|
||||
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 <boost/typeof/typeof_impl.hpp>
|
||||
|
||||
namespace boost { namespace type_of {
|
||||
|
||||
template<class V, int n>
|
||||
struct decorate_decode_begin
|
||||
{
|
||||
typedef typename decorate_type<
|
||||
typename decode_begin<V>::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
|
@@ -148,11 +148,8 @@ namespace boost
|
||||
}
|
||||
}
|
||||
|
||||
# define BOOST_TYPEOF_NO_TYPE(expr) \
|
||||
boost::type_of::msvc_typeid_wrapper<sizeof(*boost::type_of::encode_start(expr))>
|
||||
|
||||
# define BOOST_TYPEOF(expr) \
|
||||
BOOST_TYPEOF_NO_TYPE(expr)::type
|
||||
boost::type_of::msvc_typeid_wrapper<sizeof(*boost::type_of::encode_start(expr))>::type
|
||||
|
||||
# define BOOST_TYPEOF_TPL(expr) typename BOOST_TYPEOF(expr)
|
||||
|
||||
|
@@ -47,7 +47,6 @@
|
||||
|
||||
# define BOOST_TYPEOF_TPL BOOST_TYPEOF
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
// auto
|
||||
|
@@ -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<BOOST_TYPEOF_ENCODED_VECTOR(Expr) >
|
||||
#define BOOST_TYPEOF(Expr) BOOST_TYPEOF_NO_TYPE(Expr)::type
|
||||
#define BOOST_TYPEOF(Expr)\
|
||||
boost::type_of::decode_begin<BOOST_TYPEOF_ENCODED_VECTOR(Expr) >::type
|
||||
|
||||
#define BOOST_TYPEOF_TPL typename BOOST_TYPEOF
|
||||
|
||||
|
Reference in New Issue
Block a user