diff --git a/STL_Extension/test/STL_Extension/test_fwd_make_array.cpp b/STL_Extension/test/STL_Extension/test_fwd_make_array.cpp index 6d55735a14f..dc1663b53a3 100644 --- a/STL_Extension/test/STL_Extension/test_fwd_make_array.cpp +++ b/STL_Extension/test/STL_Extension/test_fwd_make_array.cpp @@ -14,8 +14,17 @@ struct A // move-only class, move-constructible from B int main() { - // this test requires C++17 mandatory return-value optimization (RVO) +#if ! defined(_MSC_VER) || (_MSC_VER > 1916) + // This test requires C++17 mandatory return-value optimization (RVO). + // + // MSVC-2017 does not implement C++17 correctly + // See https://godbolt.org/z/7Y34Y1c53 + // and commit 15349f0bdafe60b85697f9d142c2652200d968e8 + // where we introduced a workaround for MSVC-2017: disable the correct + // forwarding of arguments in the `make_array` function. + // For that reason we disable this test for MSVC-2017) std::array a = CGAL::make_array(B()); +#endif auto b = CGAL::make_array(1u); static_assert(std::is_same_v>); CGAL_USE(a);