Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/GSL.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJordan Maples <jomaples@microsoft.com>2020-04-09 20:34:58 +0300
committerJordan Maples <jomaples@microsoft.com>2020-04-09 20:34:58 +0300
commit2f9d8730439ba0cc1998c6f3239498af79e352fe (patch)
tree13a8af728e90d1f427ae2f4654461644662a609d /tests
parentf85166aa8bc9b111c469369528880ea292880c8b (diff)
added additional filtering to Apple clang versions 9.4 and 10.1 for the ArrayConvertibilityCheck
Diffstat (limited to 'tests')
-rw-r--r--tests/span_compatibility_tests.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/span_compatibility_tests.cpp b/tests/span_compatibility_tests.cpp
index fa327f7..db9efba 100644
--- a/tests/span_compatibility_tests.cpp
+++ b/tests/span_compatibility_tests.cpp
@@ -42,7 +42,14 @@ static_assert(std::is_convertible<Derived*, Base*>::value, "std::is_convertible<
static_assert(!std::is_convertible<Derived (*)[], Base (*)[]>::value,
"!std::is_convertible<Derived(*)[], Base(*)[]>");
-#if (defined(_MSC_VER)) || (defined(__GNUC__) && __GNUC__ > 7) || (defined(__clang__) && __clang_major__ > 6)
+// int*(*) [], int const* const(*)[] was identified as an issue in CWG330 and the resolution was provided with N4261
+// The changes were not backported to all versions of the compilers that GSL supports.
+// The `if constexpr` should prevent codegen from happening if it is not supported however a few compilers continue to complain about the logic within.
+// Filtering g++ version < 8, clang version < 7, and Apple clang versions 9.4 and 10.1.
+#if (defined(_MSC_VER)) || \
+(defined(__GNUC__) && __GNUC__ > 7) || \
+(defined(__APPLE__) && defined(__clang__) && (!(__clang_major__ == 9 && __clang_minor == 4) && !(__clang_major__ == 10 && __clang_minro__ == 1))) || \
+(defined(__clang__) && __clang_major__ > 6)
template <class = void>
void ArrayConvertibilityCheck()
{