type_traits.instance_of - MichaelMiller-/sec21 GitHub Wiki

sec21::type_traits::instance_of

#include <sec21/type_traits/instance_of.h>

Checks whether a type corresponds to an instantiation of a class.

Example

static_assert(is_instance_of_v<std::basic_string, std::string> == true);
static_assert(is_instance_of_v<std::tuple, std::tuple<int, double>> == true);
static_assert(is_instance_of_v<std::tuple, std::vector<int>> == false);
static_assert(is_instance_of_v<std::vector, std::tuple<int, double>> == false);
⚠️ **GitHub.com Fallback** ⚠️