    template<class T, class R = void>  
    struct enable_if_type
    {
        typedef R type;
    };

    template<class E, class Enable = void>
    struct GetFloatType
    {
        typedef E type;
    };

    template<class E>
    struct GetFloatType<E, typename enable_if_type<typename E::Scalar>::type>
    {
        typedef typename E::Scalar type;
    };


    template <class Elemtype, class Floattype = typename GetFloatType<Elemtype>::type>
    class ExponentialSmoother
    {
        // ...
    };

    template<typename T>
    class Vector
    {
        public:
        typedef T Scalar;
    };

    template<typename T>
    class Vector2
    {
    };

int main()
{
    ExponentialSmoother<Vector<float> > a;
	ExponentialSmoother<Vector2<float> > b;
	ExponentialSmoother<double> c;
}