私は CRTP を使用しており、基本クラスにはテンプレート機能があります。use
テンプレート化された派生クラスでそのメンバー関数を使用するにはどうすればよいですか?
template <typename T>
struct A {
int f();
template <typename S>
int g();
};
struct B: public A<B> {
int h() { return f() + g<void>(); } // ok
};
template <typename T>
struct C: public A<C<T>> {
// must 'use' to get without qualifying with this->
using A<C<T>>::f; // ok
using A<C<T>>::g; // nope
int h() { return f() + g<void>(); } // doesn't work
};
* 編集 * 以前の質問、コメントを含むタイプ依存のテンプレート名の宣言の使用は、これが不可能であることを示唆しており、標準の見落としである可能性があります。