I have this code:
template<char... Ts>
class myIDClass
{
protected:
std::vector<uint8_t> m_ID = { Ts... };
public:
std::vector<uint8_t> getID()
{
return m_ID;
}
}
and I can use it in this way:
class MyClass: myIDClass<'1','2','3','4','5','6','7','8'>
{
// some code here
}
MyClass mc;
But I want to make sure that the person that uses myIDClass enter exactly 8 character to enter as template parameter to the class. How can I do during compilation?
Is there anyway that I can do this using of static_asset?