File indexing completed on 2025-01-18 09:38:12
0001
0002
0003
0004
0005
0006
0007 #ifndef BOOST_HISTOGRAM_DETAIL_RELAXED_TUPLE_SIZE_HPP
0008 #define BOOST_HISTOGRAM_DETAIL_RELAXED_TUPLE_SIZE_HPP
0009
0010 #include <type_traits>
0011
0012 namespace boost {
0013 namespace histogram {
0014 namespace detail {
0015
0016 using dynamic_size = std::integral_constant<std::size_t, static_cast<std::size_t>(-1)>;
0017
0018
0019 template <class T>
0020 constexpr dynamic_size relaxed_tuple_size(const T&) noexcept {
0021 return {};
0022 }
0023
0024 template <class... Ts>
0025 constexpr std::integral_constant<std::size_t, sizeof...(Ts)> relaxed_tuple_size(
0026 const std::tuple<Ts...>&) noexcept {
0027 return {};
0028 }
0029
0030 template <class T>
0031 using relaxed_tuple_size_t = decltype(relaxed_tuple_size(std::declval<T>()));
0032
0033 }
0034 }
0035 }
0036
0037 #endif