c++ - Substitute fully instantiated classes with partially instantiated ancestor classes -
i want accepted_dense_vector<??>::value return 'true' when give template parameters in form: c<t> when c uvector , dynamic_array , t std::is_arithmetic . std::array<t,s> when t std::is_arithmetic . container_reference<c> when accepted_dense_vector<c>::value 'true'. all works fine, in derived, instantiated classes a, c, d, want remove workaround parent definition. how can this? #include <iostream> #include <array> using namespace std; // definition of used types. template<typename t> struct dynamic_array {}; template<typename t> struct uvector {}; struct : public uvector<double> { typedef uvector<double> parent; }; struct c : public { typedef parent; }; struct d : public std::array<double,5> { typedef std::array<double,5> parent; }; template<typename t> struct b : public uvector<t> { typedef uvector<t> parent; }; template<typename t> struct co...