summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2021-09-27 03:39:27 +1000
committer Vas Crabb <vas@vastheman.com>2021-09-27 03:39:27 +1000
commite82c6cb9774338a927357cabd7a318595eca3f6a (patch)
treed46b5b526143777474c0dfa8d7dee29e9440c0a6 /src/emu
parentefdb9a072f84e1da7ff40f15fbdb13e20b808480 (diff)
libc++ 6 std::is_invocable_r doesn't work on MFP for incomplete class - disable broken tests when detected.
Diffstat (limited to 'src/emu')
-rw-r--r--src/emu/validity.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/emu/validity.cpp b/src/emu/validity.cpp
index ca3389cde41..18ba2c6fc6b 100644
--- a/src/emu/validity.cpp
+++ b/src/emu/validity.cpp
@@ -47,10 +47,12 @@ using test_delegate = delegate<char (void const *&)>;
// type
//-------------------------------------------------
+#if !defined(_LIBCPP_VERSION) || (_LIBCPP_VERSION >= 7000)
test_delegate make_diamond_class_delegate(char (diamond_inheritance::*func)(void const *&), diamond_inheritance *obj)
{
return test_delegate(func, obj);
}
+#endif // !defined(_LIBCPP_VERSION) || (_LIBCPP_VERSION >= 7000)
//-------------------------------------------------
@@ -1391,6 +1393,7 @@ void validate_delegates_mfp()
if (&o != addr)
osd_printf_error("Error testing delegate this pointer adjustment for virtual member function through base class pointer %p -> %p (expected %p)\n", static_cast<void const *>(static_cast<base_b *>(&o)), addr, static_cast<void const *>(&o));
+#if !defined(_LIBCPP_VERSION) || (_LIBCPP_VERSION >= 7000)
// test creating delegates for a forward-declared class
cb1 = make_diamond_class_delegate(&diamond_inheritance::get_derived_a, &d);
cb2 = make_diamond_class_delegate(&diamond_inheritance::get_derived_b, &d);
@@ -1409,8 +1412,8 @@ void validate_delegates_mfp()
if (static_cast<virtual_derived_b *>(&d) != addr)
osd_printf_error("Error testing delegate this pointer adjustment for incomplete class %p -> %p (expected %p)\n", static_cast<void const *>(&d), addr, static_cast<void const *>(static_cast<virtual_derived_b *>(&d)));
- // test MSVC extension allowing casting member pointer types across virtual inheritance relationships
#if defined(_MSC_VER) && !defined(__clang__)
+ // test MSVC extension allowing casting member pointer types across virtual inheritance relationships
cb1 = make_diamond_class_delegate(&diamond_inheritance::get_base, &d);
addr = nullptr;
@@ -1419,7 +1422,8 @@ void validate_delegates_mfp()
osd_printf_error("Error testing delegate non-virtual member function dispatch for incomplete class\n");
if (static_cast<virtual_base *>(&d) != addr)
osd_printf_error("Error testing delegate this pointer adjustment for incomplete class %p -> %p (expected %p)\n", static_cast<void const *>(&d), addr, static_cast<void const *>(static_cast<virtual_base *>(&d)));
-#endif // defined(_MSC_VER)
+#endif // defined(_MSC_VER) && !defined(__clang__)
+#endif // !defined(_LIBCPP_VERSION) || (_LIBCPP_VERSION >= 7000)
}