tags:

views:

37

answers:

2

How declare this:

template<typename T>
(T::ABC)& get();

it gives error:

error: expected constructor, destructor, or type conversion before ‘&’ token
+3  A: 

Use the typename keyword:

template<typename T>
typename T::ABC& get();
Autopulated
+1  A: 

It has to be:

template<typename T>
typename T::ABC& get();

but i tried, which don't works:

template<typename T>
(typename T::ABC)& get();
Miro
Yes, I tried it too and realised that. I don't know why it doesn't work with brackets!
Autopulated