|
||||
File indexing completed on 2024-11-15 09:34:13
0001 // Copyright David Abrahams 2003. 0002 // Distributed under the Boost Software License, Version 1.0. (See 0003 // accompanying file LICENSE_1_0.txt or copy at 0004 // http://www.boost.org/LICENSE_1_0.txt) 0005 0006 #ifndef BOOST_IMPLICIT_CAST_DWA200356_HPP 0007 #define BOOST_IMPLICIT_CAST_DWA200356_HPP 0008 0009 #include <boost/config.hpp> 0010 #ifdef BOOST_HAS_PRAGMA_ONCE 0011 # pragma once 0012 #endif 0013 0014 namespace boost { 0015 0016 namespace detail { 0017 0018 template<class T> struct icast_identity 0019 { 0020 typedef T type; 0021 }; 0022 0023 } // namespace detail 0024 0025 // implementation originally suggested by C. Green in 0026 // http://lists.boost.org/MailArchives/boost/msg00886.php 0027 0028 // The use of identity creates a non-deduced form, so that the 0029 // explicit template argument must be supplied 0030 template <typename T> 0031 constexpr T implicit_cast (typename boost::detail::icast_identity<T>::type x) { 0032 return x; 0033 } 0034 0035 } // namespace boost 0036 0037 0038 #endif // BOOST_IMPLICIT_CAST_DWA200356_HPP
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |