P
Peng Yu
Hi All,
In the book
Working Paper for
Draft Proposed International Standard for Information Systems$)A!*
Programming Language C+ +,
template argument deduction is discussed.
However, the discussion in the above book is too abstract to read.
My question is:
For example, although the definition of bind2nd is
template <class _Operation, class _Tp>
inline binder2nd<_Operation>
bind2nd(const _Operation& __oper, const _Tp& __x)
{
typedef typename _Operation::second_argument_type _Arg2_type;
return binder2nd<_Operation>(__oper, _Arg2_type(__x));
}
we can still call bind2nd without specify _Operation and _Tp
explicitly like.
bind2nd(greater<int>(), 100).
I'm wondering if there any books or webpages which discuss this issue
in great details and provide many examples.
Best wishes,
Peng
In the book
Working Paper for
Draft Proposed International Standard for Information Systems$)A!*
Programming Language C+ +,
template argument deduction is discussed.
However, the discussion in the above book is too abstract to read.
My question is:
For example, although the definition of bind2nd is
template <class _Operation, class _Tp>
inline binder2nd<_Operation>
bind2nd(const _Operation& __oper, const _Tp& __x)
{
typedef typename _Operation::second_argument_type _Arg2_type;
return binder2nd<_Operation>(__oper, _Arg2_type(__x));
}
we can still call bind2nd without specify _Operation and _Tp
explicitly like.
bind2nd(greater<int>(), 100).
I'm wondering if there any books or webpages which discuss this issue
in great details and provide many examples.
Best wishes,
Peng