【发布时间】:2014-01-07 05:57:23
【问题描述】:
在vs2005上一切正常,但在vs2013上不行。 我有代码:
template <
typename _path_builder,
typename _vertex_allocator
>
struct CBuilderAllocatorConstructor {
template <template <typename _T> class _vertex>
class CDataStorage :
public _path_builder::CDataStorage<_vertex>,
public _vertex_allocator::CDataStorage<typename _path_builder::CDataStorage<_vertex>::CGraphVertex>
{
public:
typedef typename _path_builder::CDataStorage<_vertex> CDataStorageBase;
typedef typename _vertex_allocator::CDataStorage<
typename _path_builder::CDataStorage<
_vertex
>::CGraphVertex
> CDataStorageAllocator;
typedef typename CDataStorageBase::CGraphVertex CGraphVertex;
typedef typename CGraphVertex::_index_type _index_type;
public:
IC CDataStorage (const u32 vertex_count);
virtual ~CDataStorage ();
IC void init ();
};
};
但是在移植到 vs 2013 之后,我遇到了错误:在线
typedef typename _path_builder::CDataStorage<_vertex> CDataStorageBase;
错误 C2143:语法错误:在 '
编辑: 谢谢大家的回复,我都更正了
【问题讨论】:
标签: c++ visual-studio templates visual-c++