Odd template

In type_traits I can see:
// [func.require] paragraph 1 bullet 1:
struct __result_of_memfun_ref_impl
template<typename _Fp, typename _Tp1, typename... _Args>
static __result_of_success<decltype(
), __invoke_memfun_ref> _S_test(int);

static __failure_type _S_test(...);

Especially "( ) . * std" - what means this parens, dot and star ?
Last edited on
Last edited on
To explicitly answer each of these:

std::declval is a function, so the parentheses are just the usual syntax for a function call.


The .* is, as mbozzi says, accessing a member of the object returned by the function. Specifically, the member is a pointer, so the star is dereferencing the pointer.

In other words, these symbols have their normal C++ meanings. It just looks a bit confusing because they're all being used close together in the same line.
Last edited on
Topic archived. No new replies allowed.