Mercurial > hg > vamp-build-and-test
annotate DEPENDENCIES/generic/include/boost/implicit_cast.hpp @ 16:2665513ce2d3
Add boost headers
author | Chris Cannam |
---|---|
date | Tue, 05 Aug 2014 11:11:38 +0100 |
parents | |
children | c530137014c0 |
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@16 | 8 # include <boost/mpl/identity.hpp> |
Chris@16 | 9 |
Chris@16 | 10 namespace boost { |
Chris@16 | 11 |
Chris@16 | 12 // implementation originally suggested by C. Green in |
Chris@16 | 13 // http://lists.boost.org/MailArchives/boost/msg00886.php |
Chris@16 | 14 |
Chris@16 | 15 // The use of identity creates a non-deduced form, so that the |
Chris@16 | 16 // explicit template argument must be supplied |
Chris@16 | 17 template <typename T> |
Chris@16 | 18 inline T implicit_cast (typename mpl::identity<T>::type x) { |
Chris@16 | 19 return x; |
Chris@16 | 20 } |
Chris@16 | 21 |
Chris@16 | 22 // incomplete return type now is here |
Chris@16 | 23 //template <typename T> |
Chris@16 | 24 //void implicit_cast (...); |
Chris@16 | 25 |
Chris@16 | 26 } // namespace boost |
Chris@16 | 27 |
Chris@16 | 28 |
Chris@16 | 29 #endif // IMPLICIT_CAST_DWA200356_HPP |