error: expected initializer before '<' token | global

I have a class with a template like this:

template <template <class, class> class ContainerType>

And I set some global functions and static in the private field ..

I achieved my these functions outside the class and before any function I declare the template

template <template <class, class> class ContainerType>

But with such a function for all I get this error:

error: expected initializer before '<' token

    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);
    }

What it can be and how I solve it!?

Upvotes: 0

Views: 722

Answers (1)

Christophe
Christophe

Reputation: 73366

Try

 template<template<class, class> class ContainerType>
 void Book::listCopier(const List_to_copy<ContainerType>& that)
 { ... }

Upvotes: 2

Related Questions