annotate DEPENDENCIES/generic/include/boost/implicit_cast.hpp @ 125:34e428693f5d vext

Vext -> Repoint
author Chris Cannam
date Thu, 14 Jun 2018 11:15:39 +0100
parents c530137014c0
children
rev   line source
Chris@16 1 // Copyright David Abrahams 2003.
Chris@16 2 // Distributed under the Boost Software License, Version 1.0. (See
Chris@16 3 // accompanying file LICENSE_1_0.txt or copy at
Chris@16 4 // http://www.boost.org/LICENSE_1_0.txt)
Chris@16 5 #ifndef IMPLICIT_CAST_DWA200356_HPP
Chris@16 6 # define IMPLICIT_CAST_DWA200356_HPP
Chris@16 7
Chris@101 8 namespace boost {
Chris@16 9
Chris@101 10 namespace detail {
Chris@101 11
Chris@101 12 template<class T> struct icast_identity
Chris@101 13 {
Chris@101 14 typedef T type;
Chris@101 15 };
Chris@101 16
Chris@101 17 } // namespace detail
Chris@16 18
Chris@16 19 // implementation originally suggested by C. Green in
Chris@16 20 // http://lists.boost.org/MailArchives/boost/msg00886.php
Chris@16 21
Chris@16 22 // The use of identity creates a non-deduced form, so that the
Chris@16 23 // explicit template argument must be supplied
Chris@16 24 template <typename T>
Chris@101 25 inline T implicit_cast (typename boost::detail::icast_identity<T>::type x) {
Chris@16 26 return x;
Chris@16 27 }
Chris@16 28
Chris@16 29 // incomplete return type now is here
Chris@16 30 //template <typename T>
Chris@16 31 //void implicit_cast (...);
Chris@16 32
Chris@16 33 } // namespace boost
Chris@16 34
Chris@16 35
Chris@16 36 #endif // IMPLICIT_CAST_DWA200356_HPP