// Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 #pragma once #include #include "opentelemetry/nostd/detail/type_pack_element.h" #include "opentelemetry/nostd/detail/variant_fwd.h" #include "opentelemetry/version.h" OPENTELEMETRY_BEGIN_NAMESPACE namespace nostd { template struct variant_alternative; template using variant_alternative_t = typename variant_alternative::type; template struct variant_alternative : std::add_const> {}; template struct variant_alternative : std::add_volatile> {}; template struct variant_alternative : std::add_cv> {}; template struct variant_alternative> { static_assert(I < sizeof...(Ts), "index out of bounds in `std::variant_alternative<>`"); using type = detail::type_pack_element_t; }; } // namespace nostd OPENTELEMETRY_END_NAMESPACE