fix doc example typo
[boost.git] / boost / implicit_cast.hpp
blob5b1cd92b9b3963e5560e87199f1c7f5625797e60
1 // Copyright David Abrahams 2003.
2 // Distributed under the Boost Software License, Version 1.0. (See
3 // accompanying file LICENSE_1_0.txt or copy at
4 // http://www.boost.org/LICENSE_1_0.txt)
5 #ifndef IMPLICIT_CAST_DWA200356_HPP
6 # define IMPLICIT_CAST_DWA200356_HPP
8 # include <boost/mpl/identity.hpp>
10 namespace boost {
12 // implementation originally suggested by C. Green in
13 // http://lists.boost.org/MailArchives/boost/msg00886.php
15 // The use of identity creates a non-deduced form, so that the
16 // explicit template argument must be supplied
17 template <typename T>
18 inline T implicit_cast (typename mpl::identity<T>::type x) {
19 return x;
22 // incomplete return type now is here
23 //template <typename T>
24 //void implicit_cast (...);
26 } // namespace boost
29 #endif // IMPLICIT_CAST_DWA200356_HPP