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

source code of boost/libs/typeof/include/boost/typeof/decltype.hpp