]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/api/include/opentelemetry/nostd/detail/variant_size.h
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / api / include / opentelemetry / nostd / detail / variant_size.h
1 #pragma once
2
3 #include <type_traits>
4
5 #include "opentelemetry/nostd/detail/variant_fwd.h"
6 #include "opentelemetry/version.h"
7
8 OPENTELEMETRY_BEGIN_NAMESPACE
9 namespace nostd
10 {
11 template <typename T>
12 struct variant_size;
13
14 template <typename T>
15 struct variant_size<const T> : variant_size<T>
16 {};
17
18 template <typename T>
19 struct variant_size<volatile T> : variant_size<T>
20 {};
21
22 template <typename T>
23 struct variant_size<const volatile T> : variant_size<T>
24 {};
25
26 template <typename... Ts>
27 struct variant_size<variant<Ts...>> : std::integral_constant<size_t, sizeof...(Ts)>
28 {};
29 } // namespace nostd
30 OPENTELEMETRY_END_NAMESPACE