I
Igor R.
Hello,
What is the correct, portable way to do the following:
template<template<class> class Derived, class T> class Base
{
Base(int i)
{}
};
template<typename T> class Derived : public Base<Derived, T>
{
public:
Derived(int i) : Base<Derived, T>(i) // doesn't compile with gcc 4.2
{}
};
Compiler error is:
error: type/value mismatch at argument 1 in template parameter list
for 'template<template<class> class Derived, class T> class Base'
expected a class template, got 'Derived<T>'
Thanks!
What is the correct, portable way to do the following:
template<template<class> class Derived, class T> class Base
{
Base(int i)
{}
};
template<typename T> class Derived : public Base<Derived, T>
{
public:
Derived(int i) : Base<Derived, T>(i) // doesn't compile with gcc 4.2
{}
};
Compiler error is:
error: type/value mismatch at argument 1 in template parameter list
for 'template<template<class> class Derived, class T> class Base'
expected a class template, got 'Derived<T>'
Thanks!