├── .gitignore ├── .pre-commit-config.yaml ├── .github └── workflows │ ├── ci.yml │ └── deploy.yml ├── README.md └── src └── operator-question-mark.bs /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.html 3 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | repos: 2 | - repo: local 3 | hooks: 4 | - id: bikeshed-build 5 | name: check bikeshed files build 6 | entry: bikeshed update && bikeshed spec 7 | language: python 8 | types: [file] 9 | files: \.bs$ 10 | additional_dependencies: ['bikeshed'] 11 | 12 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | on: 3 | pull_request: 4 | paths: ["src/**"] 5 | jobs: 6 | main: 7 | name: Build and Validate 8 | runs-on: ubuntu-20.04 9 | steps: 10 | - uses: actions/checkout@v2 11 | - uses: w3c/spec-prod@v2 12 | with: 13 | TOOLCHAIN: bikeshed 14 | SOURCE: src/operator-question-mark.bs 15 | VALIDATE_LINKS: true 16 | VALIDATE_MARKUP: true 17 | -------------------------------------------------------------------------------- /.github/workflows/deploy.yml: -------------------------------------------------------------------------------- 1 | name: Auto Deployment 2 | on: 3 | push: 4 | branches: [master] 5 | paths: ["src/**"] 6 | 7 | jobs: 8 | main: 9 | name: Build, Validate and Deploy 10 | runs-on: ubuntu-20.04 11 | steps: 12 | - uses: actions/checkout@v2 13 | - uses: w3c/spec-prod@v2 14 | with: 15 | TOOLCHAIN: bikeshed 16 | SOURCE: src/operator-question-mark.bs 17 | DESTINATION: operator-question-mark/index.html 18 | VALIDATE_LINKS: true 19 | VALIDATE_MARKUP: true 20 | GH_PAGES_BRANCH: gh-pages 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Overview 2 | 3 | This repository tracks papers and proposals for the C++ standards committee. 4 | 5 | Papers are currently written in the [bikeshed] format, and are stored under the 6 | `src/` directory. The proposals are built, validated, and deployed to github pages 7 | on every push to master. 8 | 9 | # Current Proposals 10 | 11 | | Number | File | Title | Standard | Status | 12 | |:------:|:--------------------------------------------------------------:|:------------------------------------------------------------:|:-----------:|:---------:| 13 | | TBD | [src/operator-question-mark.bs](src/operator-question-mark.bs) | [Error Propagation Via Operator '?'][operator-question-mark] | Post C++23? | WIP Draft | 14 | 15 | 16 | # Links 17 | 18 | - [How To Submit a Proposal](https://isocpp.org/std/submit-a-proposal) 19 | 20 | [bikeshed]: https://github.com/tabatkins/bikeshed 21 | [operator-question-mark]: https://serenityos.github.io/cpp-papers/operator-question-mark/ 22 | 23 | -------------------------------------------------------------------------------- /src/operator-question-mark.bs: -------------------------------------------------------------------------------- 1 |
2 | Title: Error propagation via postfix operator16 | 17 | # Introduction # {#introduction} 18 | 19 | The postfix operator `?` is designed to operate on utility classes like `std::optional?3 | Shortname: P0TBD 4 | Revision: 0 5 | Audience: LWG 6 | Status: D 7 | URL: https://serenityos.github.io/cpp-papers/operator-question-mark/ 8 | Group: WG21 9 | !Source: https://github.com/SerenityOS/cpp-papers/blob/master/src/operator-question-mark.bs 10 | Editor: Brian Gianforcaro, bgianf@serenityos.org 11 | Abstract: The postfix operator?short circuits execution flow by returning the error value contained by optional error types likestd::expected<T,E>. 12 | Abstract: If the type contains no error value, then control continues as normal, and the value contained by thestd::expected<T,E>is the result of the expression. 13 | Date: 2021-08-25 14 | Markup Shorthands: markdown yes 15 |