StormByte C++ Library 0.0.9999
StormByte is a comprehensive, cross-platform C++ library aimed at easing system programming, configuration management, logging, and database handling tasks. This library provides a unified API that abstracts away the complexities and inconsistencies of different platforms (Windows, Linux).
Loading...
Searching...
No Matches
StormByte::Type::VariantHasType Concept Reference

Concept to check if a variant type contains a specific type. More...

#include <type_traits.hxx>

Concept definition

template<typename T, typename U>
concept StormByte::Type::VariantHasType = Variant<T> && variant_has_type<std::remove_cvref_t<T>, U>::value
Concept to check if a variant type contains a specific type.
Definition type_traits.hxx:292
Concept to check if a type is a variant.
Definition type_traits.hxx:278

Detailed Description

Concept to check if a variant type contains a specific type.

Template Parameters
TVariant type to check.
UType to look for within the variant.

A type satisfies VariantHasType if U is one of the alternative types in the variant T.

template<Type::VariantHasType<T, U> T, U>
void handle_variant(T var) { ... }