comparison DEPENDENCIES/generic/include/boost/implicit_cast.hpp @ 101:c530137014c0

Update Boost headers (1.58.0)
author Chris Cannam
date Mon, 07 Sep 2015 11:12:49 +0100
parents 2665513ce2d3
children
comparison
equal deleted inserted replaced
100:793467b5e61c 101:c530137014c0
3 // accompanying file LICENSE_1_0.txt or copy at 3 // accompanying file LICENSE_1_0.txt or copy at
4 // http://www.boost.org/LICENSE_1_0.txt) 4 // http://www.boost.org/LICENSE_1_0.txt)
5 #ifndef IMPLICIT_CAST_DWA200356_HPP 5 #ifndef IMPLICIT_CAST_DWA200356_HPP
6 # define IMPLICIT_CAST_DWA200356_HPP 6 # define IMPLICIT_CAST_DWA200356_HPP
7 7
8 # include <boost/mpl/identity.hpp> 8 namespace boost {
9 9
10 namespace boost { 10 namespace detail {
11
12 template<class T> struct icast_identity
13 {
14 typedef T type;
15 };
16
17 } // namespace detail
11 18
12 // implementation originally suggested by C. Green in 19 // implementation originally suggested by C. Green in
13 // http://lists.boost.org/MailArchives/boost/msg00886.php 20 // http://lists.boost.org/MailArchives/boost/msg00886.php
14 21
15 // The use of identity creates a non-deduced form, so that the 22 // The use of identity creates a non-deduced form, so that the
16 // explicit template argument must be supplied 23 // explicit template argument must be supplied
17 template <typename T> 24 template <typename T>
18 inline T implicit_cast (typename mpl::identity<T>::type x) { 25 inline T implicit_cast (typename boost::detail::icast_identity<T>::type x) {
19 return x; 26 return x;
20 } 27 }
21 28
22 // incomplete return type now is here 29 // incomplete return type now is here
23 //template <typename T> 30 //template <typename T>