c++ - Passing template parameters to base class, concise notation -


is there more consice way pass parameters base template class?

template <class ii, class ici> class graphbase : public graphbaseofbase<ii, ici> { ... };  template <> class graphbase<std::vector<int>::iterator, std::vector<int>::const_iterator> :     public graphbaseofbase<         std::vector<int>::iterator,         std::vector<int>::const_iterator> { ... }; 

you might use using shorten primary types used, like:

using vec_it = typename std::vector<int>::iterator; using vec_cit = std::vector<int>::iterator; 

and then

 template <>  class graphbase : public graphbaseofbase<vec_it, vec_cit>  {      //...  }; 

Comments

Popular posts from this blog

'hasOwnProperty' in javascript -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

How to understand 2 main() functions after using uftrace to profile the C++ program? -