epoc32/include/stdapis/boost/implicit_cast.hpp
branchSymbian2
changeset 2 2fe1408b6811
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/stdapis/boost/implicit_cast.hpp	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -0,0 +1,29 @@
     1.4 +// Copyright David Abrahams 2003.
     1.5 +// Distributed under the Boost Software License, Version 1.0. (See
     1.6 +// accompanying file LICENSE_1_0.txt or copy at
     1.7 +// http://www.boost.org/LICENSE_1_0.txt)
     1.8 +#ifndef IMPLICIT_CAST_DWA200356_HPP
     1.9 +# define IMPLICIT_CAST_DWA200356_HPP
    1.10 +
    1.11 +# include <boost/mpl/identity.hpp>
    1.12 +
    1.13 +namespace boost {
    1.14 +
    1.15 +// implementation originally suggested by C. Green in
    1.16 +// http://lists.boost.org/MailArchives/boost/msg00886.php
    1.17 +
    1.18 +// The use of identity creates a non-deduced form, so that the
    1.19 +// explicit template argument must be supplied
    1.20 +template <typename T>
    1.21 +inline T implicit_cast (typename mpl::identity<T>::type x) {
    1.22 +    return x;
    1.23 +}
    1.24 +
    1.25 +// incomplete return type now is here
    1.26 +//template <typename T>
    1.27 +//void implicit_cast (...);
    1.28 +
    1.29 +
    1.30 +} // namespace boost
    1.31 +
    1.32 +#endif // IMPLICIT_CAST_DWA200356_HPP