Is it possible to extract in c++ the container template class? -


i wondering if possible detect template class container type, , redefine parameters. example :

typedef std::vector<int> vint; typedef typeget<vint>::change_param<double> vdouble; 

where vdouble std::vector<double>?

adding on @kerrek sb's answer, here generic approach:

template<typename...> struct rebinder;  template<template<typename...> class container, typename ... args> struct rebinder<container<args...>>{     template<typename ... uargs>     using rebind = container<uargs...>; }; 

which work container under sun.


Comments

Popular posts from this blog

html - Difficulties with background-image property -

visual studio code - What does the isShellCommand property actually do and how should you use it? -

ios - Segue not passing data between ViewControllers -