I would like to use the standard library to check that a type is a specific template. I'm not sure if I'm using the right terms here. This is what I want:
// this is pseudo-code
template <typename X>
struct MyStruct {};
int main()
{
bool check1 = std::is_of_template<MyStruct, bool>::value; // false
bool check2 = std::is_of_template<MyStruct, std::vector<int>>::value; // false
bool check3 = std::is_of_template<MyStruct, MyStruct<int>>::value; // true
}
I know that is_of_template
does not exist and that this syntax is not even legal, but I hope it illustrates what I'm after. Does the Standard Library provide some functionality that would help me to achieve something like this?