Skip to content

Commit

Permalink
Merge pull request #27 from steve-downey/design-notes
Browse files Browse the repository at this point in the history
Add design note for value_or
  • Loading branch information
steve-downey committed Feb 13, 2024
2 parents e6d9993 + 145d938 commit 800c79c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions papers/optional_ref_wording.tex
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ \section{Shallow vs Deep const}
\section{Conditional Explicit}
As in the base template, \tcode{explicit} is made conditional on the type used to construct the optional. \tcode{explicit(!std::is_convertible_v<U, T>)}. This is not present in boost::optional, leading to differences in construction between braced initialization and = that can be surprising.

\section{value_or}
Have \tcode{value_or} return a \tcode{T\&}. Check that the supplied value can be bound to a T\&.

\section{Compiler Explorer Playground}

See \url{https://godbolt.org/z/n5oooK58W} for a playground with relevant Google Test functions and various optional implementations made available for cross reference.
Expand Down

0 comments on commit 800c79c

Please sign in to comment.