1 /*
2 Copyright 2019 Glen Joseph Fernandes
3 (glenjofe@gmail.com)
4 
5 Distributed under the Boost Software License, Version 1.0.
6 (http://www.boost.org/LICENSE_1_0.txt)
7 */
8 #ifndef BOOST_ALIGN_DETAIL_ADD_REFERENCE_HPP
9 #define BOOST_ALIGN_DETAIL_ADD_REFERENCE_HPP
10 
11 #include <boost/config.hpp>
12 
13 #if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS)
14 #include <type_traits>
15 #endif
16 
17 namespace boost {
18 namespace alignment {
19 namespace detail {
20 
21 #if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS)
22 using std::add_lvalue_reference;
23 #else
24 template<class T>
25 struct add_lvalue_reference {
26     typedef T& type;
27 };
28 
29 template<>
30 struct add_lvalue_reference<void> {
31     typedef void type;
32 };
33 
34 template<>
35 struct add_lvalue_reference<const void> {
36     typedef const void type;
37 };
38 #endif
39 
40 } /* detail */
41 } /* alignment */
42 } /* boost */
43 
44 #endif
45