What are you involved with is the using directive. Using the declaration can be used perfectly with the templates of the base classes (I did not look at it in the standard, but just tested it using the compiler):
template<typename T> struct c1 {
void foo() { std::cout << "empty" << std::endl; }
};
template<typename T> struct c2 : c1<T> {
using c1<T>::foo;
void foo(int) { std::cout << "int" << std::endl; }
};
int main() {
c2<void> c;
c.foo();
c.foo(10);
}
foo , c2 .
: . :
, ( ). :
struct c1 {
template<int> void foo() { std::cout << "empty" << std::endl; }
};
struct c2 : c1 {
using c1::foo;
void foo(int) { std::cout << "int" << std::endl; }
};
int main() {
c2 c;
c.foo<10>();
c.foo(10);
}