C++ 错误:在';之前应为初始值设定项<';令牌|全局

C++ 错误:在';之前应为初始值设定项<';令牌|全局,c++,C++,我有一个类,其模板如下: template <template <class, class> class ContainerType> 模板 我在私有字段中设置了一些全局函数和静态函数 我在类之外实现了这些函数,在任何函数之前我都声明了模板 template <template <class, class> class ContainerType> 模板 但有了这样一个函数,我得到了这个错误: 错误:在“Try”之前需要初始值设定项 模板

我有一个类,其模板如下:

template <template <class, class> class ContainerType>
模板
我在私有字段中设置了一些全局函数和静态函数

我在类之外实现了这些函数,在任何函数之前我都声明了模板

template <template <class, class> class ContainerType>
模板
但有了这样一个函数,我得到了这个错误:

错误:在“Try”之前需要初始值设定项

模板
作废书籍::列表复制器(const List\u to\u copy&that)
{ ... }

阅读有关模板的章节将是一个很好的开端它需要像那样嵌套吗?我读了!但我不知道是什么导致了这个问题…@מגדשקייה请发布一个最小的代码片段,我们可以尝试编译和复制这个问题。以上内容无效。它不声明或定义类/函数。您的代码片段是声明的一部分。寻找一个有效的例子。@polarysekt:你是什么意思!?
    template<template<class, class> class ContainerType>
    void Book<ContainerType>::listCopier(const List_to_copy<ContainerType>& that)
    {
        if(mylist.begin() != mylist.end())
            std::for_each(mylist.begin(), mylist.end(), DeleteLIST());
        _this = this;
        std::for_each(that.mylist.begin(), that.mylist.end(), myAllocator);
    }
 template<template<class, class> class ContainerType>
 void Book::listCopier(const List_to_copy<ContainerType>& that)
 { ... }