【发布时间】:2022-12-03 17:46:15
【问题描述】:
For following class
template<typename T>
class test {
public:
using unit = std::micro;
};
How do I access unit like test::unit without having to specify the template argument or make it a template alias. Please note that inserting a dummy template argument like e.g . int is not an option since some template classes cannot be instantiated with such types.
标签: c++
template<typename T> class Test : public TestBase, and then put everything they have in common in the base class.template<typename T>means \"everything that follows depends onT\"test_defsand thentestcan inherit from it.