Prefer std::optional over boost:optional:

Some of the boost::optionals must remain for now.  Both
boost::beast and SOCI have interfaces that require
boost::optional.
This commit is contained in:
Scott Schurr
2020-11-13 15:09:18 -08:00
committed by Nik Bougalis
parent 85307b29d0
commit 3b33318dc8
241 changed files with 1293 additions and 1248 deletions

View File

@@ -58,7 +58,7 @@ class ClosureCounter_test : public beast::unit_test::suite
BEAST_EXPECT(evidence == 2);
// Destroying the contents of wrapped should decrement voidCounter.
wrapped = boost::none;
wrapped = std::nullopt;
BEAST_EXPECT(voidCounter.count() == 0);
}
{
@@ -82,7 +82,7 @@ class ClosureCounter_test : public beast::unit_test::suite
BEAST_EXPECT(evidence == 11);
// Destroying the contents of wrapped should decrement setCounter.
wrapped = boost::none;
wrapped = std::nullopt;
BEAST_EXPECT(setCounter.count() == 0);
}
{
@@ -102,7 +102,7 @@ class ClosureCounter_test : public beast::unit_test::suite
BEAST_EXPECT((*wrapped)(2, -8) == -6);
// Destroying the contents of wrapped should decrement sumCounter.
wrapped = boost::none;
wrapped = std::nullopt;
BEAST_EXPECT(sumCounter.count() == 0);
}
}
@@ -274,8 +274,8 @@ class ClosureCounter_test : public beast::unit_test::suite
using namespace std::chrono_literals;
voidCounter.join("testWrap", 1ms, j);
// Wrapping a closure after join() should return boost::none.
BEAST_EXPECT(voidCounter.wrap([]() {}) == boost::none);
// Wrapping a closure after join() should return std::nullopt.
BEAST_EXPECT(voidCounter.wrap([]() {}) == std::nullopt);
}
void
@@ -310,7 +310,7 @@ class ClosureCounter_test : public beast::unit_test::suite
// Destroy the contents of wrapped and expect the thread to exit
// (asynchronously).
wrapped = boost::none;
wrapped = std::nullopt;
BEAST_EXPECT(voidCounter.count() == 0);
// Wait for the thread to exit.