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)
5 
6 #ifndef BOOST_TYPEOF_DECLTYPE_HPP_INCLUDED
7 # define BOOST_TYPEOF_DECLTYPE_HPP_INCLUDED
8 
9 #include <boost/type_traits/remove_cv.hpp>
10 #include <boost/type_traits/remove_reference.hpp>
11 
12 namespace boost { namespace type_of {
13     template<typename T>
14         using remove_cv_ref_t = typename remove_cv<typename remove_reference<T>::type>::type;
15 }}
16 
17 #define BOOST_TYPEOF(expr) boost::type_of::remove_cv_ref_t<decltype(expr)>
18 #define BOOST_TYPEOF_TPL BOOST_TYPEOF
19 
20 #define BOOST_TYPEOF_NESTED_TYPEDEF_TPL(name,expr) \
21     struct name {\
22         typedef BOOST_TYPEOF_TPL(expr) type;\
23     };
24 
25 #define BOOST_TYPEOF_NESTED_TYPEDEF(name,expr) \
26     struct name {\
27         typedef BOOST_TYPEOF(expr) type;\
28     };
29 
30 #define BOOST_TYPEOF_REGISTER_TYPE(x)
31 #define BOOST_TYPEOF_REGISTER_TEMPLATE(x, params)
32 
33 #endif //BOOST_TYPEOF_DECLTYPE_HPP_INCLUDED
34 
35