namespace _bi
{
template< class Pm,
int I > struct add_cref;
template< class M,
class T > struct add_cref< M T::*, 0
>
{
typedef
M type;
};
template< class M,
class T > struct add_cref< M T::*, 1
>
{
typedef
M const & type;
};
template<class
R> struct
isref
{
enum
value_type { value = 0 };
};
template<class R>
struct isref< R&
>
{
enum
value_type { value = 1 };
};
template<class R>
struct isref< R*
>
{
enum
value_type { value = 1 };
};
template<class Pm,
class A1> struct
dm_result
{
typedef typename add_cref< Pm, 1 >::type
type;
};
template<class
Pm, class R, class F, class L> struct dm_result< Pm, bind_t<R, F, L>
>
{
typedef typename bind_t<R, F, L>::result_type
result_type;
typedef typename
add_cref< Pm, isref< result_type >::value >::type
type;
};
}
the compiler will
convert the result type to const reference, then pass it to user's function, the
error is caught.
Now, all things
is come out. But I don't understand why add const reference to the result
type and the behavior is difference with the version 1.33.1.
Wait for your answer
and thanks for your time, and sorry for my poor in
English:)