c++ - Problem with template specialization and template template parameters -



c++ - Problem with template specialization and template template parameters -

i have class helper:

template <typename t, template <typename> e> class helper { ... };

i have class template, exposure, inherit helper while passing template template parameter e. need specialize exposure. want write following:

template <> class exposure<int> : public helper<int, exposure> { exposure() : helper<int, exposure>() { ... }; ... };

unfortunately won't compile. gcc complains:

exposure.h:170: error: type/value mismatch @ argument 2 in template parameter list `‘template > class exposurehelper’

exposure.h:170: error: expected constant of type ‘’, got ‘exposure’

am doing wrong? there workaround i'm trying do?

if want pass template rather class

template <typename t, template<typename> class e> class helper { }; template <typename t> class exposure; template <> class exposure<int> : public helper<int, exposure > { };

or if intent different

template <typename t, typename e> class helper { }; template <typename t> class exposure; template <> class exposure<int> : public helper<int, exposure<int> > { };

c++ design templates template-specialization

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -