Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@StephanTLavavej
Copy link

I work on Microsoft Visual C++, where we regularly build popular open-source projects, including yours, with development builds of our compiler and libraries to detect and prevent shipping regressions that would affect you. This also allows us to provide advance notice of breaking changes, which is the case here.

I just merged microsoft/STL#5105, which revealed a conformance issue in cppcoro.

Compiler error with this STL change:

C:\gitP\andreasbuhr\cppcoro\test\cancellation_token_tests.cpp(294,28): error C3083: 'high_resolution_clock': the symbol to the left of a '::' must be a type

Affected code:

auto start = std::chrono::high_resolution_clock::now();

This was assuming that including <thread> makes the chrono::high_resolution_clock type available, which is not guaranteed by the Standard. You must explicitly include <chrono>.

@andreasbuhr
Copy link
Owner

Thanks a lot

@andreasbuhr andreasbuhr merged commit 9376645 into andreasbuhr:main Nov 23, 2024
@StephanTLavavej StephanTLavavej deleted the include-chrono branch November 23, 2024 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants