- 论坛徽章:
- 0
|
我有下面的简单代码:
- #include <iostream>
- using namespace std;
- template <class Type>
- class Q {
- public:
- template <class Iter> class CL;
- public:
- enum QA { empty, full };
- QA status;
- };
- template <class Type> template <class Iter>
- class Q<Type>::CL<Iter>
- {
- Type member;
- Iter iter;
- };
- int main()
- {
- Q<double> qd;
- qd.status = Q<double>::empty;
- return 0;
- }
复制代码 但我在编译时遇到如下的错误信息,请问我怎么解决呢? (C++新手)
- ~/tmp $ g++ q.cc
- q.cc:15: error: partial specialization 'Q<Type>::CL<Iter>' does not specialize any template arguments
复制代码 |
|