|
28 | 28 |
|
29 | 29 | class task_cancelled_exception : public exception
|
30 | 30 | {
|
31 |
| - public: |
32 |
| - task_cancelled_exception() noexcept; |
33 |
| - virtual const char* what() const noexcept override; |
| 31 | + public: |
| 32 | + task_cancelled_exception() noexcept; |
| 33 | + virtual const char* what() const noexcept override; |
34 | 34 | };
|
35 | 35 | }
|
36 | 36 | }
|
|
61 | 61 |
|
62 | 62 | class task_block
|
63 | 63 | {
|
64 |
| - private: |
65 |
| - ~task_block(); |
| 64 | + private: |
| 65 | + ~task_block(); |
66 | 66 |
|
67 |
| - public: |
68 |
| - task_block(const task_block&) = delete; |
69 |
| - task_block& operator=(const task_block&) = delete; |
70 |
| - void operator&() const = delete; |
| 67 | + public: |
| 68 | + task_block(const task_block&) = delete; |
| 69 | + task_block& operator=(const task_block&) = delete; |
| 70 | + void operator&() const = delete; |
71 | 71 |
|
72 |
| - template<class F> |
73 |
| - void run(F&& f); |
| 72 | + template<class F> |
| 73 | + void run(F&& f); |
74 | 74 |
|
75 |
| - void wait(); |
| 75 | + void wait(); |
76 | 76 | };
|
77 | 77 | }
|
78 | 78 | }
|
|
202 | 202 | \begin{example}
|
203 | 203 | \begin{codeblock}
|
204 | 204 | define_task_block([&](auto& tb) {
|
205 |
| - tb.run([&]{ process(a, w, x); }); // Process a[w] through a[x] |
206 |
| - if (y < x) tb.wait(); // Wait if overlap between [w,x) and [y,z) |
207 |
| - process(a, y, z); // Process a[y] through a[z] |
| 205 | + tb.run([&]{ process(a, w, x); }); // Process a[w] through a[x] |
| 206 | + if (y < x) tb.wait(); // Wait if overlap between [w,x) and [y,z) |
| 207 | + process(a, y, z); // Process a[y] through a[z] |
208 | 208 | });
|
209 | 209 | \end{codeblock}
|
210 | 210 | \end{example}
|
|
214 | 214 | \rSec1[parallel.task_block.define_task_block]{Function template \tcode{define_task_block}}
|
215 | 215 |
|
216 | 216 | \begin{itemdecl}
|
217 |
| -template<class F> |
218 |
| - void define_task_block(F&& f); |
219 |
| - |
220 |
| -template<class F> |
221 |
| - void define_task_block_restore_thread(F&& f); |
| 217 | +template<class F> void define_task_block(F&& f); |
| 218 | +template<class F> void define_task_block_restore_thread(F&& f); |
222 | 219 | \end{itemdecl}
|
223 | 220 |
|
224 | 221 | \begin{itemdescr}
|
|
0 commit comments