タグ付けされた質問 「typename」

6
「テンプレート」と「タイプ名」のキーワードをどこに、なぜ配置しなければならないのですか?
テンプレートでは、どこで、なぜ私は配置する必要がありますtypenameし、template依存名に? とにかく依存名は正確には何ですか? 私は次のコードを持っています: template <typename T, typename Tail> // Tail will be a UnionNode too. struct UnionNode : public Tail { // ... template<typename U> struct inUnion { // Q: where to add typename/template here? typedef Tail::inUnion<U> dummy; }; template< > struct inUnion<T> { }; }; template <typename T> // …
弊社のサイトを使用することにより、あなたは弊社のクッキーポリシーおよびプライバシーポリシーを読み、理解したものとみなされます。
Licensed under cc by-sa 3.0 with attribution required.