How can I check if a template's parameter is empty? Or of a "certain type"?
I'd prefer to check if it's empty or not rather than the type because if the wrong type is entered, it'd throw an error anyway..
But I definitely need to know if the parameter passed to the template is blank.
Why?
My Code:
void Insert() {/*Just for recurssion*/ /* Provided by Deceptikon */}
template<typename T, typename... Args>
DOSTUFF& Insert(T First, const Args... Remaining)
{
this->Meh.push_back(First); //Error will be here if it's empty..
Insert(Remaining...);
return *this;
}
So again.. Three questions:
1. How do I check the Template's parameter type?
2. How do I restrict the Template's parameter to a specific type only? //Though this breaks the purpose of a template ={
3. How do I check if the Template's Parameter is Blank/Null/Empty?