/* * Copyright (C) 2021-present ScyllaDB */ /* * SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.0 */ #pragma once #include #include namespace utils { // Given type T and an std::variant Variant, return std::true_type if T is a variant element template struct is_variant_element; template struct is_variant_element> : std::bool_constant<(std::is_same_v || ...)> { }; // Givent type T and std::variant, true if T is one of the variant elements. template concept VariantElement = is_variant_element::value; }