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
Post a Comment