I have a template class taking 3 arguments, I need to bind 2 of them before and pass later that binded version to a "Parent" template template class
I inherit from.
(I've searched previously asked questions, but none tries to inherit from the parent.)
How could I make it work ?
Here is a sample code :
template <template<class> class W, class ...D>
struct Parent{};
template <class B, class T, class ...D>
struct Arg{};
template <class B, class ...D>
struct Bind{
template <class T>
using arg = Arg<B, T, D...>;
};
template <class B, class ...D>
struct DD : public Parent<Bind<B, D...>::t, D...> //compiler complains*
{ };
* template argument for template template parameter must be a class template or type alias template.
I have tried using typename
keyword ; and using a struct
inheriting instead of a using directive
in the Binder
, none worked.