1 // Copyright (C) 2006 Arkadiy Vertleyb
2 // Copyright (C) 2017 Daniela Engert
3 // Use, modification and distribution is subject to the Boost Software
4 // License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
6 #ifndef BOOST_TYPEOF_DECLTYPE_HPP_INCLUDED
7 # define BOOST_TYPEOF_DECLTYPE_HPP_INCLUDED
9 #include <boost/type_traits/remove_cv.hpp>
10 #include <boost/type_traits/remove_reference.hpp>
12 namespace boost { namespace type_of {
14 using remove_cv_ref_t = typename remove_cv<typename remove_reference<T>::type>::type;
17 #define BOOST_TYPEOF(expr) boost::type_of::remove_cv_ref_t<decltype(expr)>
18 #define BOOST_TYPEOF_TPL BOOST_TYPEOF
20 #define BOOST_TYPEOF_NESTED_TYPEDEF_TPL(name,expr) \
22 typedef BOOST_TYPEOF_TPL(expr) type;\
25 #define BOOST_TYPEOF_NESTED_TYPEDEF(name,expr) \
27 typedef BOOST_TYPEOF(expr) type;\
30 #define BOOST_TYPEOF_REGISTER_TYPE(x)
31 #define BOOST_TYPEOF_REGISTER_TEMPLATE(x, params)
33 #endif //BOOST_TYPEOF_DECLTYPE_HPP_INCLUDED