mirror of
https://github.com/boostorg/conversion.git
synced 2025-08-02 14:04:28 +02:00
Remove use of mpl::identity from implicit_cast.hpp.
This commit is contained in:
@@ -5,17 +5,24 @@
|
|||||||
#ifndef IMPLICIT_CAST_DWA200356_HPP
|
#ifndef IMPLICIT_CAST_DWA200356_HPP
|
||||||
# define IMPLICIT_CAST_DWA200356_HPP
|
# define IMPLICIT_CAST_DWA200356_HPP
|
||||||
|
|
||||||
# include <boost/mpl/identity.hpp>
|
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
|
|
||||||
|
namespace detail {
|
||||||
|
|
||||||
|
template<class T> struct icast_identity
|
||||||
|
{
|
||||||
|
typedef T type;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace detail
|
||||||
|
|
||||||
// implementation originally suggested by C. Green in
|
// implementation originally suggested by C. Green in
|
||||||
// http://lists.boost.org/MailArchives/boost/msg00886.php
|
// http://lists.boost.org/MailArchives/boost/msg00886.php
|
||||||
|
|
||||||
// The use of identity creates a non-deduced form, so that the
|
// The use of identity creates a non-deduced form, so that the
|
||||||
// explicit template argument must be supplied
|
// explicit template argument must be supplied
|
||||||
template <typename T>
|
template <typename T>
|
||||||
inline T implicit_cast (typename mpl::identity<T>::type x) {
|
inline T implicit_cast (typename boost::detail::icast_identity<T>::type x) {
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user