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

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -