Commit 0466c33
committed
wording: make swap noexcept precise for reference E; document error storage
Close the two loose ends from the storage fix:
1. The primary and void swap exception specifications tested
is_nothrow_swappable_v<E>, which for a reference E asks whether the
*referents* are nothrow-swappable -- over-conservative, since swap
exchanges the errors as unexpected<E> (a pointer swap for E&, always
noexcept). Respell the E terms as unexpected<E> in both swap noexcept
specs and the primary swap's branch guard. Equivalent for object E;
correctly noexcept for reference E.
2. Add a marked General paragraph to expected<T, E> and expected<void, E>
stating the error is unex.error(), held as unexpected<E> so E may be an
lvalue reference (E& cannot be a union member; unexpected<E&> holds a
pointer). Pure additions.
Verified: build clean at 93 pages; stripped diff vs expected-base.tex
changes exactly 19 lines (3 relaxation + 13 storage + 3 swap), the two
notes being additions; no churn.1 parent 75b6265 commit 0466c33
1 file changed
Lines changed: 21 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
626 | 626 | | |
627 | 627 | | |
628 | 628 | | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
629 | 638 | | |
630 | 639 | | |
631 | 640 | | |
| |||
1348 | 1357 | | |
1349 | 1358 | | |
1350 | 1359 | | |
1351 | | - | |
| 1360 | + | |
1352 | 1361 | | |
1353 | 1362 | | |
1354 | 1363 | | |
| |||
1384 | 1393 | | |
1385 | 1394 | | |
1386 | 1395 | | |
1387 | | - | |
| 1396 | + | |
1388 | 1397 | | |
1389 | 1398 | | |
1390 | 1399 | | |
| |||
2038 | 2047 | | |
2039 | 2048 | | |
2040 | 2049 | | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
| 2055 | + | |
| 2056 | + | |
| 2057 | + | |
| 2058 | + | |
2041 | 2059 | | |
2042 | 2060 | | |
2043 | 2061 | | |
| |||
2461 | 2479 | | |
2462 | 2480 | | |
2463 | 2481 | | |
2464 | | - | |
| 2482 | + | |
2465 | 2483 | | |
2466 | 2484 | | |
2467 | 2485 | | |
| |||
0 commit comments