-
Notifications
You must be signed in to change notification settings - Fork 17
Lwg 20250314 #117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Lwg 20250314 #117
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
14d400b
Update tex infrastructure from current draft
steve-downey 6ee7d36
Introduce convert-ref-init-val helper function
steve-downey f3d44e5
Drive by fix for signed/unsigned
steve-downey fe98463
Fix undefined behavior in emplace and test it
steve-downey a94c5cf
Move base/derived example out of optional_ref example
steve-downey 917cce5
Update wording as instructed
steve-downey e85fa11
Fix "This type"
steve-downey 787d618
Use optional.ref. as stable tag base
steve-downey b4f7b8c
Add checklist from LWG review
steve-downey b126ae8
Make value and value_or oneliners
steve-downey f2d7691
Remove stray std:: in wording
steve-downey 51c1d23
value_or should remove_cv_t
steve-downey 68560f3
value_or() to allow using {} as argument
steve-downey b47faf9
Remove extraneous cast in value_or
steve-downey c380bad
Add todo checkbox
steve-downey 31b610e
Fix monadic wording
steve-downey e8186f9
Define "contained value" for optional<T&>
steve-downey c4a6385
Hash support is untouched
steve-downey 9af9095
Add back some Postcondition blocks
steve-downey 577f16b
Finish checklist
steve-downey 1a0eacc
Fix optional.ref TeX references
steve-downey 87449a4
Fix typos, control characters, acknowledgments
steve-downey 842f1e8
Update changelog and paper number
steve-downey ce36d3d
Refresh baseline for hardexpects
steve-downey f5d1b34
Remove editor note, change applied
steve-downey 01a7065
Update std tex macros
steve-downey ccde69f
Paper after second LWG review
steve-downey ef2f679
Wording fixes from reflector review
steve-downey a8822ba
Merge remote-tracking branch 'origin/LWG-20250314' into LWG-20250314
steve-downey 953599c
merge wording
steve-downey eb637cd
Merge remote-tracking branch 'origin/LWG-20250314' into LWG-20250314
steve-downey b817696
edits from LWG
steve-downey a5a1756
Merge remote-tracking branch 'refs/remotes/origin/LWG-20250314' into …
steve-downey a38cdfb
Reformat example code
steve-downey 2e398cd
Per directions from LWG review
steve-downey 757ae5d
Transform put U back
steve-downey d36d579
Further copy edit pass
steve-downey 163426c
rewrite borrowed range specialization
steve-downey 83cef25
default optional<T&> constructor
steve-downey 82da4e6
value_or support braced default
steve-downey d14c5a6
Run latexdiff
steve-downey 288d645
Set master TeX doc for auctex
steve-downey 8404ffc
Use phrasing from `expected` for specialization
steve-downey fe69592
Put back a tref as tcode
steve-downey 23ce553
Don't try to import the grammar
steve-downey 30db472
Fix typo in error message
steve-downey be2e3df
Fix ternary op ambiguity
steve-downey b515c03
Fix some out-of-scope xrefs
steve-downey b0c298a
Format code nit
steve-downey 0b8603d
Remove braces in wording where not needed
steve-downey 85255a9
Fix angle brackets for concept
steve-downey 7bc1e8c
Apply edits from 20250404 teleconference
steve-downey a23c2b9
Mark paper with P
steve-downey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,3 +27,4 @@ compile_commands.json | |
| .update-submodules | ||
| /.install/ | ||
| /.venv/ | ||
| /papers/P2988/_minted/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| // examples/optional_ref.cpp -*-C++-*- | ||
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
|
||
| #include <beman/optional/optional.hpp> | ||
|
|
||
| struct derived; | ||
| extern derived d; | ||
| struct base { | ||
| virtual ~base() = default; | ||
| operator derived&() { return d; } | ||
| }; | ||
|
|
||
| struct derived : base {}; | ||
|
|
||
| derived d; | ||
|
|
||
| int example() { | ||
| base b; | ||
| derived& dref(b); // ok | ||
| beman::optional::optional<derived&> dopt(b); // ok | ||
| (void)dref; | ||
| return 0; | ||
| } | ||
|
|
||
| int main() { example(); } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| #+options: ':nil *:t -:t ::t <:t H:8 \n:nil ^:t arch:headline author:t | ||
| #+options: broken-links:nil c:nil creator:nil d:(not "LOGBOOK") date:t e:t | ||
| #+options: email:nil expand-links:t f:t inline:t num:t p:nil pri:nil prop:nil | ||
| #+options: stat:t tags:t tasks:t tex:t timestamp:t title:t toc:t todo:t |:t | ||
| #+title: lwg-20250314 | ||
| #+date: <2025-03-14 Fri> | ||
| #+author: Steve Downey | ||
| #+email: sdowney@pwyll | ||
| #+language: en | ||
| #+select_tags: export | ||
| #+exclude_tags: noexport | ||
| #+creator: Emacs 30.1.50 (Org mode 9.7.11) | ||
| #+cite_export: | ||
|
|
||
| #+options: html-link-use-abs-url:nil html-postamble:auto html-preamble:t | ||
| #+options: html-scripts:t html-style:t html5-fancy:nil tex:t | ||
| #+html_doctype: xhtml-strict | ||
| #+html_container: div | ||
| #+html_content_class: content | ||
| #+description: | ||
| #+keywords: | ||
| #+html_link_home: | ||
| #+html_link_up: | ||
| #+html_mathjax: | ||
| #+html_equation_reference_format: \eqref{%s} | ||
| #+html_head: | ||
| #+html_head_extra: | ||
| #+subtitle: | ||
| #+infojs_opt: | ||
| #+creator: <a href="https://www.gnu.org/software/emacs/">Emacs</a> 30.1.50 (<a href="https://orgmode.org">Org</a> mode 9.7.11) | ||
| #+latex_header: | ||
|
|
||
| * Notes | ||
| https://wg21.link/P2988r9 std::optional<T&> | ||
| SD presenting | ||
| [optionalref.iterators] | ||
| TS: p1: “These types” -> “This type” | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| DK: there is no const_iterator? | ||
| SD: no, constness is shallow | ||
| JW: should there be a const_iterator typedef? | ||
| TK: no, it would be a lie | ||
| JW: “referring to the referred to value” | ||
| TK: referring to *val | ||
| SD: I have “referring to the contained value” | ||
| [optionalref.observe] | ||
| SD: there should be hardened preconditions once that landed | ||
| JW: make value() a one-liner as in non-specialization | ||
| TK: value_or should remove_cv_t | ||
| TK: the mandate shouldn’t have a std:: qualification | ||
| JW: should the stable names use [optional.ref] | ||
| JW: also a one-liner on value_or | ||
| JW: we did something on value_or() to allow using {} as argument | ||
| JW: the Mandate on value_or() looks different | ||
| SD: over here it is a bit longer and we should probably fix the other one | ||
| [optionalref.monadics] | ||
| TK: in p3 it becomes valid contained type? | ||
| SD: yes | ||
| JW: in p7 what is U? There is something missing | ||
| TK: it should be invoke_result_t<F> | ||
| TK: the definition of U should be consistent | ||
| JW: in p4: we shouldn’t use trailing return types here | ||
| TK: we can remove the mandates | ||
| SD: no, it is needed | ||
| JW: now that there is a “contains” we could write it exactly the same as normal optional | ||
| TK: we want to use the same wording for transform() | ||
| Stopping before [optionalref.mod] | ||
|
|
||
| * Checklist | ||
| SD presenting | ||
| [optionalref.iterators] | ||
| - [X] TS: p1: “These types” -> “This type” | ||
| DK: there is no const_iterator? | ||
| SD: no, constness is shallow | ||
| JW: should there be a const_iterator typedef? | ||
| TK: no, it would be a lie | ||
| JW: “referring to the referred to value” | ||
| TK: referring to *val | ||
| SD: I have “referring to the contained value” | ||
| [optionalref.observe] | ||
| SD: there should be hardened preconditions once that landed | ||
| - [X] JW: make value() a one-liner as in non-specialization | ||
| - [X] TK: value_or should remove_cv_t | ||
| - [X] TK: the mandate shouldn’t have a std:: qualification | ||
| - [X] JW: should the stable names use [optional.ref] | ||
| - [X] JW: also a one-liner on value_or | ||
| - [X] JW: we did something on value_or() to allow using {} as argument | ||
| JW: the Mandate on value_or() looks different | ||
| SD: over here it is a bit longer and we should probably fix the other one | ||
| [optionalref.monadics] | ||
| TK: in p3 it becomes valid contained type? | ||
| SD: yes | ||
| - [X] JW: in p7 what is U? There is something missing | ||
| - [X] TK: it should be invoke_result_t<F> | ||
| - [X] TK: the definition of U should be consistent | ||
| - [X] JW: in p4: we shouldn’t use trailing return types here | ||
| TK: we can remove the mandates | ||
| SD: no, it is needed | ||
| JW: now that there is a “contains” we could write it exactly the same as normal optional | ||
| - [X] TK: we want to use the same wording for transform() | ||
| Stopping before [optionalref.mod] | ||
|
|
||
| Note add "contained value" definition for optional<T&> | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for splitting these examples!