From 785c6fd3b966f3e44c69a281491d3b79ebe8675b Mon Sep 17 00:00:00 2001 From: Alvin Wong Date: Fri, 18 Nov 2022 04:28:57 +0800 Subject: [PATCH] Fix multi_threaded_map/_vector tests on Clang --- test/test/CMakeLists.txt | 2 +- test/test/multi_threaded_common.h | 1 - test/test/multi_threaded_map.cpp | 4 ---- test/test/multi_threaded_vector.cpp | 6 +----- 4 files changed, 2 insertions(+), 11 deletions(-) diff --git a/test/test/CMakeLists.txt b/test/test/CMakeLists.txt index f5921a0bc..c14fc7c00 100644 --- a/test/test/CMakeLists.txt +++ b/test/test/CMakeLists.txt @@ -46,7 +46,7 @@ endforeach() add_executable(test-vanilla main.cpp ${TEST_SRCS}) set_target_properties(test-vanilla PROPERTIES OUTPUT_NAME "test") -target_link_libraries(test-vanilla runtimeobject) +target_link_libraries(test-vanilla runtimeobject synchronization) target_precompile_headers(test-vanilla PRIVATE pch.h) set_source_files_properties( diff --git a/test/test/multi_threaded_common.h b/test/test/multi_threaded_common.h index 22a3e6577..971e56c6b 100644 --- a/test/test/multi_threaded_common.h +++ b/test/test/multi_threaded_common.h @@ -152,7 +152,6 @@ namespace concurrent_collections concurrency_checked_random_access_iterator(container const* c, iterator it) : owner(c), iterator(it) {} // Implicit conversion from non-const iterator to const iterator. - template>> concurrency_checked_random_access_iterator(concurrency_checked_random_access_iterator other) : owner(other.owner), iterator(other.inner()) { } concurrency_checked_random_access_iterator(concurrency_checked_random_access_iterator const&) = default; diff --git a/test/test/multi_threaded_map.cpp b/test/test/multi_threaded_map.cpp index f57cca23a..b2b143f11 100644 --- a/test/test/multi_threaded_map.cpp +++ b/test/test/multi_threaded_map.cpp @@ -5,9 +5,6 @@ #include "multi_threaded_common.h" -// FIXME: Fail to compile with Clang due to "error : no type named 'type' in 'std::enable_if'" -#if !defined(__clang__) - using namespace winrt; using namespace Windows::Foundation; using namespace Windows::Foundation::Collections; @@ -338,4 +335,3 @@ TEST_CASE("multi_threaded_observable_map") test_map_concurrency(); test_map_concurrency(); } -#endif diff --git a/test/test/multi_threaded_vector.cpp b/test/test/multi_threaded_vector.cpp index 55a206830..3f7408510 100644 --- a/test/test/multi_threaded_vector.cpp +++ b/test/test/multi_threaded_vector.cpp @@ -2,9 +2,6 @@ #include "multi_threaded_common.h" -// FIXME: Fail to compile with Clang due to "error : no type named 'type' in 'std::enable_if'" -#if !defined(__clang__) - using namespace winrt; using namespace Windows::Foundation; using namespace Windows::Foundation::Collections; @@ -84,7 +81,7 @@ namespace } else { - return vector.as>(); + return vector.template as>(); } } } @@ -469,4 +466,3 @@ TEST_CASE("multi_threaded_observable_vector") test_vector_concurrency(); test_vector_concurrency(); } -#endif