Skip to content

Commit 24c3993

Browse files
committed
fix CI, fix heading and add comment requested at today's editor's call
1 parent d56d679 commit 24c3993

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CppCoreGuidelines.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15034,7 +15034,7 @@ which handles spawning or reusing a thread without exposing raw threads to your
1503415034
##### Note
1503515035

1503615036
Unfortunately, `std::async` is not perfect. For example, it doesn't use a thread pool,
15037-
which means that it may fail due to resource exhaustion, rather than queueing up your tasks
15037+
which means that it may fail due to resource exhaustion, rather than queuing up your tasks
1503815038
to be executed later. However, even if you cannot use `std::async`, you should prefer to
1503915039
write your own `future`-returning factory function, rather than using raw promises.
1504015040

@@ -15050,7 +15050,7 @@ at avoiding raw `std::thread` management.
1505015050
std::thread t1([p1 = std::move(p1)]() mutable {
1505115051
p1.set_value(read_value("v1.txt"));
1505215052
});
15053-
t1.detach();
15053+
t1.detach(); // evil
1505415054

1505515055
std::packaged_task<int()> pt2(read_value, "v2.txt");
1505615056
std::future<int> f2 = pt2.get_future();
@@ -19209,6 +19209,8 @@ or even an occasional "`string`s cannot be compared with `==`).
1920919209

1921019210
The solution is to explicitly `#include <string>`:
1921119211

19212+
##### Example, good
19213+
1921219214
#include <iostream>
1921319215
#include <string>
1921419216
using namespace std;

scripts/hunspell/isocpp.dic

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,7 @@ webby
632632
Webcolor
633633
webcolors
634634
WG21
635+
WorkQueue
635636
'widen'
636637
x1
637638
x2

0 commit comments

Comments
 (0)