Skip to content

Commit a5ed331

Browse files
andreasbuhrlewissbaker
authored andcommitted
Fixes for MSVC 1928
First, std::uncought_exception() does not exist any more in C++20, it is replaced by std::uncought_exceptions(). Second, Second, in file_test.cpp we have to include <string> to use std::to_string.
1 parent 7f4ca14 commit a5ed331

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

test/doctest/doctest.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4404,7 +4404,7 @@ namespace doctest
44044404
void addToContexts(IContextScope* ptr) { contextState->contexts.push_back(ptr); }
44054405
void popFromContexts() { contextState->contexts.pop_back(); }
44064406
void useContextIfExceptionOccurred(IContextScope* ptr) {
4407-
if (std::uncaught_exception()) {
4407+
if (std::uncaught_exceptions()) {
44084408
std::ostringstream stream;
44094409
ptr->build(&stream);
44104410
contextState->exceptionalContexts.push_back(stream.str());

test/file_tests.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <random>
1717
#include <thread>
1818
#include <cassert>
19+
#include <string>
1920

2021
#include "io_service_fixture.hpp"
2122

0 commit comments

Comments
 (0)