You must have the following signature
template <typename T> void func(typename Foo<T>::Bar* bar)
However, this is not the only problem.
func(&foo.bar_);
should also be
func<int>(&foo.bar_);
This is because you are calling the func boilerplate function, but its type cannot be inferred. Without its type, it will throw an error, for example
no matching function for call to 'func(Foo<int>::Bar*)'
josephthomas
source share