# Optional\<T&\> paper soon

**URL:** <https://discourse.bemanproject.org/t/optional-t-paper-soon/168>\
**Category:** Library::optional\
**Created:** [August 3, 2024, 5:30pm UTC](https://discourse.bemanproject.org/t/optional-t-paper-soon/168 "2024-08-03T17:30:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sdowney](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.bemanproject.org/sdowney/32/73_2.png) [@Sdowney](https://discourse.bemanproject.org/u/Sdowney)\
**Post date:** [August 3, 2024, 5:30pm UTC](https://discourse.bemanproject.org/t/optional-t-paper-soon/168/1 "2024-08-03T17:30:12Z")

</div>

I’m gearing up for another rev of the optional\<T&\> paper, which means some reorg to keep wording in sync. Moving definitions out of line so the synopsis can be pulled out cleanly, `using` declarations for std:: names since the standard avoids the redundant scope, and a few other such things.  
Since there are a handful of substantive changes under review, I’ll branch off that PR and rebase to pick up any additional changes.

---

<div class="post-metadata">

**Author:** ![Sdowney](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.bemanproject.org/sdowney/32/73_2.png) [@Sdowney](https://discourse.bemanproject.org/u/Sdowney)\
**Post date:** [August 15, 2024, 2:27pm UTC](https://discourse.bemanproject.org/t/optional-t-paper-soon/168/2 "2024-08-15T14:27:17Z")

</div>

> **[P2988R6.pdf](https://isocpp.org/files/papers/P2988R6.pdf)**
>
> 178.91 KB

A few things will need to be back merged from my refref branch.

---

<div class="post-metadata">

**Author:** ![Jeff-Garland](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.bemanproject.org/jeff-garland/32/23_2.png) [@Jeff-Garland](https://discourse.bemanproject.org/u/Jeff-Garland)\
**Post date:** [August 22, 2024, 2:33pm UTC](https://discourse.bemanproject.org/t/optional-t-paper-soon/168/3 "2024-08-22T14:33:49Z")

</div>

A few thoughts:

- 1.2 and 1.3 headings should be capitals
- example 1.2

```auto
std::optional<Cat&> cat = find_cat("Fido");
cat.and_then([](Cat& thecat){/* ... */ } //<-- missing paren
//alternate client code
find_cat("Fido").and_then([](Cat& thecat){/* ... */ });

```

- “3.3 Construction of optional\<T&\> should be trivial… Boost is not.” - huh?
- Does this need to be addressed? [Optional Reference Binding - 1.86.0](https://www.boost.org/doc/libs/1_86_0/libs/optional/doc/html/boost_optional/dependencies_and_portability/optional_reference_binding.html)
- wording: there’s an awful lot of unchanged context ( 3.2 - 3.7 and later .6 - .12) here that I’d delete so as to not confuse LWG that there might be some changes
- wording: I don’t have time to look at it in detail right now
- implementation in the paper – interesting…

---

<div class="post-metadata">

**Author:** ![Sdowney](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.bemanproject.org/sdowney/32/73_2.png) [@Sdowney](https://discourse.bemanproject.org/u/Sdowney)\
**Post date:** [August 22, 2024, 3:24pm UTC](https://discourse.bemanproject.org/t/optional-t-paper-soon/168/4 "2024-08-22T15:24:12Z")

</div>

I’ll fix the Caps in Headings. Spent too much time with a different tex package that did titlecase for me, leading to different problems, of course.

I haven’t figured what would need to change, but boost’s optional fails on the relevant is\_trivial trait. Which also tells you something about just how important it is

I’ll add some test cases for ` Optional Reference Binding - 1.86.0` a few of them at least are made ill formed in some way.

I can drop the unchanged bits when it gets to LWG, keeping it for LEWG because not changing all that is part of the design, and a couple tiny bits did change. Also started with copying the relevant chunk from draft/source/utilities.tex so actual diffs are pretty easy, but latexdiff doesn’t like it.
