From df84f1f14691d8d22247d7d6d13f0b07205dabd5 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sun, 22 Dec 2024 20:10:16 +0200 Subject: [PATCH] Work around Clang 3.x failures --- include/boost/variant2/variant.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/boost/variant2/variant.hpp b/include/boost/variant2/variant.hpp index 311d83b..ed36b26 100644 --- a/include/boost/variant2/variant.hpp +++ b/include/boost/variant2/variant.hpp @@ -856,8 +856,16 @@ template using get_smallest_unsigned_type = mp11::mp_cond< >; +#if BOOST_WORKAROUND( BOOST_CLANG_VERSION, < 30800 ) + +template using get_index_type = unsigned short; + +#else + template using get_index_type = get_smallest_unsigned_type< (Double + 1) * sizeof...(T) >; +#endif + // variant_base template struct variant_base_impl;