Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
ab21982
feat: implement expected<T&, E> reference specialization (Step 7)
steve-downey Jun 2, 2026
6224d1b
docs: document EXPECT/PASS_REGULAR_EXPRESSION fail test pattern
steve-downey Jun 2, 2026
77bd728
Merge main (upstream merge) into expected-over-references
steve-downey Jun 2, 2026
c1eb4e1
Merge step7-expected-ref-t: expected<T&, E> reference specialization
steve-downey Jun 2, 2026
d170e55
docs: mark Step 7 complete, write Step 8 handoff
steve-downey Jun 2, 2026
b2adf40
Merge branch 'step7-expected-ref-t' into expected-over-references
steve-downey Jun 2, 2026
4ac2a33
docs: update plan — base branch is expected-over-references, update h…
steve-downey Jun 2, 2026
2704e84
feat: implement expected<T, E&> error-reference specialization (Step 8)
steve-downey Jun 2, 2026
e654ea0
docs: mark Step 8 complete, update handoff for Step 9
steve-downey Jun 2, 2026
c07e8bb
fix: align API surface of expected<T,E&> with expected<T&,E>
steve-downey Jun 2, 2026
da26190
Merge step8-expected-ref-e: expected<T, E&> error-reference specializ…
steve-downey Jun 2, 2026
712a4e4
feat: implement expected<T&, E&> both-reference specialization (Step 9)
steve-downey Jun 2, 2026
4edd670
fix: align API surface of expected<T&,E&> with expected<T&,E> and exp…
steve-downey Jun 2, 2026
2ee3e2e
fix: apply reference_constructs_from_temporary_v to E& error construc…
steve-downey Jun 3, 2026
8fb347d
test: add negative tests covering all concept checks in reference spe…
steve-downey Jun 3, 2026
01e10a3
Merge step9-expected-ref-both: expected<T&, E&> both-reference specia…
steve-downey Jun 3, 2026
09653ea
feat: implement expected<void, E&> void+error-reference specializatio…
steve-downey Jun 3, 2026
4035ceb
docs: mark Step 10 complete, write final handoff
steve-downey Jun 3, 2026
34ed4bc
WIP: add = delete("message") diagnostics to all deleted declarations
steve-downey Jun 3, 2026
e61d877
fix: update fail test regexes to match = delete("message") diagnostics
steve-downey Jun 5, 2026
7201658
chore: remove initial scaffolding files (todo.hpp, todo.test.cpp, tod…
steve-downey Jun 5, 2026
d9bc198
chore: remove config.hpp and config_generated.hpp.in
steve-downey Jun 5, 2026
679b226
Merge step10-expected-void-ref-e: expected<void, E&>, diagnostics, cl…
steve-downey Jun 5, 2026
4719d8f
docs: add painfully honest review guides for LLM and human reviewers
steve-downey Jun 5, 2026
4f23a4e
fix: add process_coverage target and update gcovr.cfg.in filter
steve-downey Jun 5, 2026
d64e4a6
test: add coverage tests for rvalue/const-rvalue monadic, throw, and …
steve-downey Jun 5, 2026
c9e8715
test: add shared test types and comprehensive coverage tests
steve-downey Jun 5, 2026
874ee02
refactor: distribute coverage tests to their proper per-specializatio…
steve-downey Jun 6, 2026
9fa93f9
Merge step11-distribute-coverage-tests: move coverage tests to proper…
steve-downey Jun 6, 2026
afc4344
docs: add human and LLM review guides and feature them in README
steve-downey Jun 6, 2026
047ac66
fix: replace = delete("message") with = delete; for C++23 compatibility
steve-downey Jun 6, 2026
c48faac
Merge gcc13-step01-delete-messages: remove = delete(message) for C++23
steve-downey Jun 6, 2026
025883f
fix: extend negative-compile test patterns for GCC-13 compatibility
steve-downey Jun 6, 2026
0197a52
Merge gcc13-step02-test-patterns: extend fail-test patterns for GCC-13
steve-downey Jun 6, 2026
680b459
Update from copier
steve-downey Jun 18, 2026
aff8f17
fix: extend negative-compile test patterns for Clang-22 compatibility
steve-downey Jun 18, 2026
53fff64
Merge branch 'main' into expected-over-references
steve-downey Jun 18, 2026
ba9a8b6
fix: pre-landing cleanup for expected-over-references PR
steve-downey Jun 18, 2026
34f5d54
fix: resolve three CI failures from first PR push
steve-downey Jun 18, 2026
b147bca
fix: change expected<void,E> specialization to explicit void parameter
steve-downey Jun 18, 2026
41f1f92
fix: add MSVC error phrase variants to four negative-compile test pat…
steve-downey Jun 18, 2026
059e9c7
fix: reset copier _commit to v2.4.0 after template rebase
steve-downey Jun 26, 2026
13a7c64
chore: recopy from exemplar copier branch (v2.4.1-14-g66b1f43)
steve-downey Jun 26, 2026
2732b50
docs: add papers/ directory with D4280R0 draft (std::expected<T&, E>)
steve-downey Jun 27, 2026
e1db45f
fix: address PR #57 review findings (issues 1, 3, 4, 5)
steve-downey Jun 29, 2026
7989da5
Merge fix-review-corrections: address PR #57 review findings
steve-downey Jun 29, 2026
a647181
refactor: unify expected<>'s E-axis via unexpected<E&>
steve-downey Jul 1, 2026
e000818
fix: remove history-relative wording from comments
steve-downey Jul 1, 2026
912a99f
refactor: split class bodies into declarations and out-of-line defini…
steve-downey Jul 1, 2026
3d02a91
fix: exclude self-type from expected<void,E>'s converting constructor
steve-downey Jul 1, 2026
05fdd99
test: close branch-coverage gaps found via gcc-16 coverage build
steve-downey Jul 1, 2026
808e2d6
Merge remote-tracking branch 'origin/expected-over-references' into e…
steve-downey Jul 1, 2026
befe604
fix: resolve post-merge build failures across gcc-15/16 and clang-22
steve-downey Jul 2, 2026
f7c44c7
refactor: replace concept polyfill with compiler builtins for danglin…
steve-downey Jul 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .beman-tidy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@
# Check documentation for beman-tidy here:
# https://github.com/bemanproject/beman-tidy/blob/main/README.md

disabled_rules: []
ignored_paths: []
disabled_rules:
# None
ignored_paths:
# None
3 changes: 2 additions & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# Standard answers and internal state managed by Copier
_commit: 2.0.0-322-gc3c230c
_commit: v2.4.1-14-g66b1f43
_src_path: https://github.com/steve-downey/exemplar.git
description: Expected Over References
maintainer: steve-downey
Expand Down
2 changes: 0 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
infra/** linguist-vendored
template/** linguist-vendored
copier/** linguist-vendored
*.bib -linguist-detectable
*.tex -linguist-detectable
papers/* linguist-documentation
22 changes: 1 addition & 21 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# Codeowners for reviews on PRs

# Note(river):
# **Please understand how codeowner file work before uncommenting anything in this section:**
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
#
# For projects using expected as a template and intend to reuse its infrastructure,
# River (@wusatosi) helped create most of the original infrastructure under the scope described below,
# they are more than happy to help out with any PRs downstream,
# as well as to sync any useful change upstream to expected.
#
# Github Actions:
# .github/workflows/ @wusatosi # Add other project owners here
#
# Devcontainer:
# .devcontainer/ @wusatosi # Add other project owners here
#
# Pre-commit:
# .pre-commit-config.yaml @wusatosi # Add other project owners here
# .markdownlint.yaml @wusatosi # Add other project owners here

* @ednolan @bretbrownjr @dietmarkuehl @steve-downey @wusatosi
* @steve-downey
9 changes: 7 additions & 2 deletions .github/workflows/pre-commit-check.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
name: Lint Check (pre-commit)

on:
Expand All @@ -8,8 +9,12 @@ on:
branches:
- main

permissions:
contents: read
checks: write
issues: write
pull-requests: write

jobs:
pre-commit:
permissions:
contents: read
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-pre-commit.yml@1.7.3
1 change: 0 additions & 1 deletion .github/workflows/vcpkg-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
types: [published]
jobs:
vcpkg-release:
permissions: {}
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-vcpkg-release.yml@1.7.3
with:
port_name: beman-expected
Expand Down
51 changes: 24 additions & 27 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,45 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files

# Clang-format for C++
# This brings in a portable version of clang-format.
# See also: https://github.com/ssciwr/clang-format-wheel
# Clang-format for C++
# This brings in a portable version of clang-format.
# See also: https://github.com/ssciwr/clang-format-wheel
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v22.1.5
hooks:
- id: clang-format
types_or: [c++, c]
- id: clang-format
types_or: [c++, c]

# CMake linting and formatting
# CMake linting and formatting
- repo: https://github.com/BlankSpruce/gersemi-pre-commit
rev: 0.27.7
rev: 0.27.6
hooks:
- id: gersemi
name: CMake linting
exclude: ^.*/tests/.*/data/ # Exclude test data directories
- id: gersemi
name: CMake linting
exclude: ^.*/tests/.*/data/ # Exclude test data directories

# Markdown linting
# Config file: .markdownlint.yaml
# Commented out to disable this by default.
# Uncomment to enable markdown linting.
# Markdown linting
# Config file: .markdownlint.yaml
# Commented out to disable this by default. Uncomment to enable markdown linting.
# - repo: https://github.com/igorshubovych/markdownlint-cli
# rev: v0.42.0
# hooks:
# - id: markdownlint
# - id: markdownlint

- repo: https://github.com/codespell-project/codespell
rev: v2.4.2
hooks:
- id: codespell
additional_dependencies:
- tomli

# # Beman Standard checking via beman-tidy
# - repo: https://github.com/bemanproject/beman-tidy
# rev: v0.3.1
# hooks:
# - id: beman-tidy
# Beman Standard checking via beman-tidy
- repo: https://github.com/bemanproject/beman-tidy
rev: v0.5.1
hooks:
- id: beman-tidy

exclude: 'template/|copier/|infra/|port/'
exclude: 'infra/|port/'
23 changes: 11 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# CMakeLists.txt -*-cmake-*-
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

cmake_minimum_required(VERSION 3.30...4.3)
Expand Down Expand Up @@ -81,17 +80,6 @@ add_subdirectory(include/beman/expected)
beman_install_library(beman.expected TARGETS beman.expected)
configure_build_telemetry()

if(BEMAN_EXPECTED_BUILD_TESTS)
find_package(Catch2 CONFIG REQUIRED)
# When Catch2 is fetched via FetchContent, its extras dir needs to be on the module path.
# FetchContent_GetProperties reads global state set during fetch, so works from any scope.
include(FetchContent)
FetchContent_GetProperties(catch2)
if(catch2_POPULATED AND catch2_SOURCE_DIR)
list(APPEND CMAKE_MODULE_PATH ${catch2_SOURCE_DIR}/extras)
endif()
endif()

if(BEMAN_EXPECTED_BUILD_TESTS)
enable_testing()
add_subdirectory(tests/beman/expected)
Expand All @@ -100,3 +88,14 @@ endif()
if(BEMAN_EXPECTED_BUILD_EXAMPLES)
add_subdirectory(examples)
endif()

# Coverage
configure_file("cmake/gcovr.cfg.in" gcovr.cfg @ONLY)

add_custom_target(
process_coverage
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMENT "Running gcovr to process coverage results"
COMMAND mkdir -p coverage
COMMAND gcovr --config gcovr.cfg .
)
60 changes: 47 additions & 13 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
"binaryDir": "${sourceDir}/build/${presetName}",
"cacheVariables": {
"CMAKE_CXX_STANDARD": "20",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"CMAKE_PROJECT_TOP_LEVEL_INCLUDES": "./infra/cmake/use-fetch-content.cmake"
"CMAKE_CXX_EXTENSIONS": false,
"CMAKE_CXX_STANDARD_REQUIRED": true,
"CMAKE_EXPORT_COMPILE_COMMANDS": true,
"CMAKE_PROJECT_TOP_LEVEL_INCLUDES": "${sourceDir}/infra/cmake/use-fetch-content.cmake"
}
},
{
Expand All @@ -35,7 +37,7 @@
"_debug-base"
],
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "infra/cmake/gnu-toolchain.cmake"
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/infra/cmake/gnu-toolchain.cmake"
}
},
{
Expand All @@ -46,7 +48,7 @@
"_release-base"
],
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "infra/cmake/gnu-toolchain.cmake"
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/infra/cmake/gnu-toolchain.cmake"
}
},
{
Expand All @@ -57,7 +59,12 @@
"_debug-base"
],
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "infra/cmake/llvm-toolchain.cmake"
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/infra/cmake/llvm-toolchain.cmake"
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
}
},
{
Expand All @@ -68,7 +75,12 @@
"_release-base"
],
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "infra/cmake/llvm-toolchain.cmake"
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/infra/cmake/llvm-toolchain.cmake"
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
}
},
{
Expand All @@ -79,7 +91,12 @@
"_debug-base"
],
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "infra/cmake/appleclang-toolchain.cmake"
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/infra/cmake/appleclang-toolchain.cmake"
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Darwin"
}
},
{
Expand All @@ -90,7 +107,12 @@
"_release-base"
],
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "infra/cmake/appleclang-toolchain.cmake"
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/infra/cmake/appleclang-toolchain.cmake"
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Darwin"
}
},
{
Expand All @@ -101,8 +123,12 @@
"_debug-base"
],
"cacheVariables": {
"CMAKE_CXX_STANDARD": "23",
"CMAKE_TOOLCHAIN_FILE": "infra/cmake/msvc-toolchain.cmake"
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/infra/cmake/msvc-toolchain.cmake"
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
},
{
Expand All @@ -113,16 +139,24 @@
"_release-base"
],
"cacheVariables": {
"CMAKE_CXX_STANDARD": "23",
"CMAKE_TOOLCHAIN_FILE": "infra/cmake/msvc-toolchain.cmake"
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/infra/cmake/msvc-toolchain.cmake"
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
}
],
"buildPresets": [
{
"name": "_root-build",
"hidden": true,
"jobs": 0
"jobs": 0,
"targets": [
"all_verify_interface_header_sets",
"all"
]
},
{
"name": "gcc-debug",
Expand Down
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ ctest --test-dir build
The file `./lockfile.json` configures the list of dependencies and versions that will be
acquired by FetchContent.


## Project-specific configure arguments

Project-specific options are prefixed with `BEMAN_EXPECTED`.
Expand Down
Loading
Loading