1

I think gcc is try to support this.

But, I can't find any referrence for MSVC.

My code base is currently build on c++17. I would like to use the new coroutine feature in c++20 but don't want to migrate all code rightnow. The goal is to build some components with coroutine support.

ichorate
  • 33
  • 5
  • This is an interesting question, but it would be better to edit and provide your real use case. – Louis Go May 19 '21 at 07:24
  • My code base is currently build on c++17. I would like to use the new coroutine feature in c++20 but don't want to migrate all code rightnow. The goal is to build some components with coroutine support. – ichorate May 19 '21 at 07:58
  • you may use [edit] to add your comment into original post. – Louis Go May 19 '21 at 08:05
  • 2
    MSVC is ABI-compatible between 2015, 2017, and 2019. There were no ABI changes between these versions. Therefore, I don't see why wouldn't be able to do that. https://learn.microsoft.com/en-us/cpp/porting/binary-compat-2015-2017?view=msvc-160 – Marius Bancila May 19 '21 at 08:19

1 Answers1

1

The rules of MSVC binary compatibility apply. Objects are link-compatible (as long as you don't use link-time code generation or whole-program optimization) between versions. Since that page doesn't say that any other compiler switches beside /LTCG and /GL break this promise, /std: won't do that either.

Sebastian Redl
  • 69,373
  • 8
  • 123
  • 157