Skip to content

Conversation

StephanTLavavej
Copy link
Member

I've merged microsoft/STL#5105, which revealed a conformance issue in cpprestsdk.

Compiler error with this STL change:

C:\gitP\Microsoft\cpprestsdk\Release\tests\common\UnitTestpp\src\TestRunner.cpp(173,22): error C3083: 'system_clock': the symbol to the left of a '::' must be a type

Affected cpprestsdk code:

std::chrono::system_clock::time_point totalTime =
std::chrono::system_clock::now() + std::chrono::milliseconds(maxTestTimeInMs);
if (testRunnerFuture.wait_until(totalTime) == std::future_status::timeout)

The problem is that cpprestsdk was assuming that including <future> makes chrono::system_clock available, which is not guaranteed by the C++ Standard. This file needs to explicitly include <chrono>.

@StephanTLavavej StephanTLavavej merged commit 0b1ce31 into microsoft:master Nov 23, 2024
1 check passed
@StephanTLavavej StephanTLavavej deleted the include-chrono branch November 23, 2024 01:53
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