Mercurial > hg > vamp-build-and-test
annotate DEPENDENCIES/generic/include/boost/implicit_cast.hpp @ 133:4acb5d8d80b6 tip
Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author | Chris Cannam |
---|---|
date | Tue, 30 Jul 2019 12:25:44 +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 |