Having read several answers on SO (e.g. here and here), I figured out the two usual alternatives for calling a function template in a template base:
template<typename T>
struct Base
{
template<int N>
auto get() const
{
return N;
}
};
template<typename T>
struct Derived : public Base<T>
{
//first alternative
auto f0() const { return this-> template get<0>(); }
//second alternative
auto f1() const { return Base<T>::template get<1>(); }
};
But is there also an equivalent to the using Base<T>::foo
declaration for non-template functions? Maybe something like
template<int N>
using Base<T>::template get<N>; //does not compile in gcc