0
#pragma once
//includes
template<class RefType>
class Foo
{
public:
template<>
enum Foo<QString>::bar { //values A }; //LINE X
template<>
enum Foo<double>::bar { //values B };
template<>
enum Foo<Kraken::Point3>::bar { //values C };
//functions
}; //LINE Y
编译器给出了LINE X故障使用模板: '类' 型redifinition
error C2011: 'Foo<QString>': 'class' type redefinition
与笔记
note: see declaration of 'Foo<QString>' LINE X
note: note: see reference to class template instantiation 'Foo<RefType>'LINE Y
我不明白,这个错误的根源错误,如果我对这个问题变得更加开明了,我会将问题的重新格式化,以便更清晰
代码中的“foo”和“bar”是什么? – xinaiz
班级名称(Foo)和枚举名称(bar)的站点名称 – brettmichaelgreen
标题中的“第44集”是什么意思? – tambre