From daa6b31c5d0ca7f895fb495218d6ae56f33aff19 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Sat, 24 Aug 2024 13:24:23 +0200 Subject: [PATCH] msvc17 workaround --- src/ifcparse/IfcFile.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/ifcparse/IfcFile.cpp b/src/ifcparse/IfcFile.cpp index 1cf65b33a3..830754444f 100644 --- a/src/ifcparse/IfcFile.cpp +++ b/src/ifcparse/IfcFile.cpp @@ -29,10 +29,18 @@ namespace { template struct is_type_in_variant; - template - struct is_type_in_variant, T> + // Specialization when there are multiple types in the variant + template + struct is_type_in_variant, T> { - static constexpr bool value = (std::is_same::value || ...); + static constexpr bool value = std::is_same::value || is_type_in_variant, T>::value; + }; + + // Specialization when there is only one type left in the variant + template + struct is_type_in_variant, T> + { + static constexpr bool value = std::is_same::value; }; template