#include <iostream>
#include <vector>
#include <functional>

// initial declaration
template <typename... T> struct X;

// default (does nothing)
template<> struct X<>
{
};

// initial type and zero-or-more following types
template <typename H, typename... T>
struct X<H*, T...> : public X<T...>
{
    H* value;
    X(H* value, T... args)
       : value(value), X<T...>(args...)
    {
    }
};

template <typename H, typename... T>
std::ostream& operator<<(std::ostream& stream, X<H*,T...> const & x)
{
    return stream << "specialized scalar pointer";
}

template <typename V, typename... T>
std::ostream& operator<<(std::ostream& stream, X<std::vector<V*>*, T...>  const & x)
{
    return stream << "specialized vector pointer";
}

int main()
{
    double a,b;
    X<double*,double*> x (&a,&b);
    
    std::vector<double *> v;
    X<std::vector<double*>*, double*> y (&v, &b);

    std::cout << x << std::endl;
    std::cout << y << std::endl;
}