X-Git-Url: https://git.donarmstrong.com/?p=rsem.git;a=blobdiff_plain;f=boost%2Ftypeof%2Fnative.hpp;fp=boost%2Ftypeof%2Fnative.hpp;h=8197e28669da1a734cb661a0048046a83b963b5e;hp=0000000000000000000000000000000000000000;hb=2d71eb92104693ca9baa5a2e1c23eeca776d8fd3;hpb=da57529b92adbb7ae74a89861cb39fb35ac7c62d diff --git a/boost/typeof/native.hpp b/boost/typeof/native.hpp new file mode 100644 index 0000000..8197e28 --- /dev/null +++ b/boost/typeof/native.hpp @@ -0,0 +1,60 @@ +// Copyright (C) 2006 Arkadiy Vertleyb +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_TYPEOF_NATIVE_HPP_INCLUDED +#define BOOST_TYPEOF_NATIVE_HPP_INCLUDED + +#ifndef MSVC_TYPEOF_HACK + +#ifdef BOOST_NO_SFINAE + +namespace boost { namespace type_of { + + template + T& ensure_obj(const T&); + +}} + +#else + +#include +#include + +namespace boost { namespace type_of { +# ifdef BOOST_NO_SFINAE + template + T& ensure_obj(const T&); +# else + template + typename enable_if, T&>::type + ensure_obj(T&); + + template + typename disable_if, T&>::type + ensure_obj(const T&); +# endif +}} + +#endif//BOOST_NO_SFINAE + +#define BOOST_TYPEOF(expr) BOOST_TYPEOF_KEYWORD(boost::type_of::ensure_obj(expr)) +#define BOOST_TYPEOF_TPL BOOST_TYPEOF + +#define BOOST_TYPEOF_NESTED_TYPEDEF_TPL(name,expr) \ + struct name {\ + typedef BOOST_TYPEOF_TPL(expr) type;\ + }; + +#define BOOST_TYPEOF_NESTED_TYPEDEF(name,expr) \ + struct name {\ + typedef BOOST_TYPEOF(expr) type;\ + }; + +#endif//MSVC_TYPEOF_HACK + +#define BOOST_TYPEOF_REGISTER_TYPE(x) +#define BOOST_TYPEOF_REGISTER_TEMPLATE(x, params) + +#endif//BOOST_TYPEOF_NATIVE_HPP_INCLUDED +