Skip to content

Commit

Permalink
Enable /clr C++20 <coroutine> support (#3201)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanTLavavej authored Dec 5, 2022
1 parent 26a1f76 commit ac11067
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
4 changes: 2 additions & 2 deletions stl/inc/yvals_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -1543,9 +1543,9 @@ _EMIT_STL_ERROR(STL1004, "C++98 unexpected() is incompatible with C++23 unexpect
#define __cpp_lib_char8_t 201907L
#endif // __cpp_char8_t

#if defined(__cpp_impl_coroutine) && !defined(_M_CEE) // TRANSITION, VSO-1663233
#ifdef __cpp_impl_coroutine
#define __cpp_lib_coroutine 201902L
#endif // defined(__cpp_impl_coroutine) && !defined(_M_CEE)
#endif // __cpp_impl_coroutine

#if _HAS_CXX20
#if !defined(__EDG__) || defined(__INTELLISENSE__) // TRANSITION, GH-395
Expand Down
2 changes: 0 additions & 2 deletions tests/std/tests/GH_000545_include_compare/test_coroutine.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#ifndef _M_CEE // TRANSITION, VSO-1663233
#include <coroutine>

// Testing LWG-3330 "Include <compare> from most library headers" by intentionally NOT including <compare>

static_assert(std::is_eq(std::partial_ordering::equivalent));
#endif // _M_CEE

void test_coroutine() {}
5 changes: 2 additions & 3 deletions tests/std/tests/P0912R5_coroutine/env.lst
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ PM_CL="/EHsc /MD /std:c++latest /permissive"
PM_CL="/EHsc /MD /std:c++latest /permissive-"
PM_CL="/EHsc /MTd /std:c++latest /permissive- /Zc:preprocessor"
PM_CL="/EHsc /MD /std:c++latest /permissive- /analyze:only /analyze:autolog-"
# TRANSITION, VSO-1663233
# PM_CL="/clr /MD /std:c++20 /d1clrcxxstd"
# PM_CL="/clr /MDd /std:c++20 /d1clrcxxstd"
PM_CL="/clr /MD /std:c++20 /d1clrcxxstd"
PM_CL="/clr /MDd /std:c++20 /d1clrcxxstd"
PM_CL="/BE /c /EHsc /MD /std:c++20 /permissive-"
PM_CL="/BE /c /EHsc /MTd /std:c++latest /permissive-"
PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing -Wno-unqualified-std-cast-call /EHsc /MD /std:c++20 /permissive-"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ STATIC_ASSERT(__cpp_lib_containers_ranges == 202202L);
#endif
#endif

#if defined(__cpp_impl_coroutine) && !defined(_M_CEE) // TRANSITION, VSO-1663233
#ifdef __cpp_impl_coroutine
#ifndef __cpp_lib_coroutine
#error __cpp_lib_coroutine is not defined
#elif __cpp_lib_coroutine != 201902L
Expand Down

0 comments on commit ac11067

Please sign in to comment.