c++ - What is the meaning of `typename` in this example? -


this question has answer here:

i looking @ example implementation of binder1st, looks this:

template <class operation, class t>   binder1st<operation> bind1st (const operation& op, const t& x) {   return binder1st<operation>(op, typename operation::first_argument_type(x)); } 

what meaning of typename operation::first_argument_type(x). understand first_argument_type typename, belonging binary_function base class. looks me function belonging namespace operation - in case, why typename used here?

it means qualified name follows typename keyword (i.e. operation::first_argument_type) interpreted name of (dependent) type.

you can read full explanation of keyword typename (which has another, different usage) here.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -