forked from boostorg/type_traits
*** empty log message ***
[SVN r27364]
This commit is contained in:
@ -14,6 +14,7 @@
|
||||
#include <boost/type_traits/is_function.hpp>
|
||||
#include <boost/type_traits/remove_bounds.hpp>
|
||||
#include <boost/type_traits/add_pointer.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <boost/mpl/identity.hpp>
|
||||
|
||||
@ -23,13 +24,16 @@ namespace boost
|
||||
template< class T >
|
||||
struct decay
|
||||
{
|
||||
typedef typename mpl::eval_if<
|
||||
is_array<T>,
|
||||
mpl::identity<typename remove_bounds<T>::type*>,
|
||||
typename mpl::eval_if<
|
||||
is_function<T>,
|
||||
add_pointer<T>,
|
||||
mpl::identity<T>
|
||||
private:
|
||||
typedef BOOST_DEDUCED_TYPENAME remove_reference<T>::type Ty;
|
||||
public:
|
||||
typedef BOOST_DEDUCED_TYPENAME mpl::eval_if<
|
||||
is_array<Ty>,
|
||||
mpl::identity<BOOST_DEDUCED_TYPENAME remove_bounds<Ty>::type*>,
|
||||
BOOST_DEDUCED_TYPENAME mpl::eval_if<
|
||||
is_function<Ty>,
|
||||
add_pointer<Ty>,
|
||||
mpl::identity<Ty>
|
||||
>
|
||||
>::type type;
|
||||
};
|
||||
|
Reference in New Issue
Block a user