Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
d6f11fd
feat: add unexpected<E&> partial specialization (pointer storage)
steve-downey Jul 5, 2026
25c360e
feat: expected<T,E> stores unexpected<E>, enabling reference error types
steve-downey Jul 5, 2026
2561a89
feat: expected<void,E> stores unexpected<E>, enabling expected<void,E&>
steve-downey Jul 5, 2026
db1c54b
feat: add expected<T&,E> reference specialization (covers T&,E and T&…
steve-downey Jul 5, 2026
3375637
docs: add design/review guides, D4280R0 paper, and plan updates
steve-downey Jul 5, 2026
7af570c
build: sync copier metadata, presets, coverage, and CI to release state
steve-downey Jul 5, 2026
0682bf6
chore: remove todo scaffolding superseded by the library
steve-downey Jul 5, 2026
ef1b5e9
fix: spell error_or's constraint via the trait, not the member typede…
steve-downey Jul 5, 2026
bafd182
fix: drop unused reference_converts_from_temporary_v (clang 18)
steve-downey Jul 5, 2026
1f5df9b
ci: drop gcc 11/12 from the test matrix (below the GCC-13 minimum)
steve-downey Jul 5, 2026
31067a8
ci: build MSVC presets in C++23 so the dangling trait is available
steve-downey Jul 5, 2026
4471011
ci: set support floor to gcc-13+/clang-19+, drop clang 17/18 and MSVC
steve-downey Jul 5, 2026
9a789d5
docs: record the gcc-13+/clang-19+ support floor and MSVC status in R…
steve-downey Jul 5, 2026
4fd3e38
test: parameterize behavioral tests to prove std::expected parity
steve-downey Jul 5, 2026
f6783fd
Merge std::expected parity test harness
steve-downey Jul 5, 2026
9e78ab9
Merge main into expected-over-references-replay
steve-downey Jul 5, 2026
3991cc3
fix: address libc++-specific CI failures in std::expected parity target
steve-downey Jul 6, 2026
1348b93
build: skip the std::expected parity target on libc++
steve-downey Jul 6, 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
48 changes: 1 addition & 47 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ jobs:
{"preset": "llvm-debug", "image": "ghcr.io/bemanproject/infra-containers-clang:latest"},
{"preset": "llvm-release", "image": "ghcr.io/bemanproject/infra-containers-clang:latest"},
{"preset": "appleclang-debug", "runner": "macos-latest"},
{"preset": "appleclang-release", "runner": "macos-latest"},
{"preset": "msvc-debug", "runner": "windows-latest"},
{"preset": "msvc-release", "runner": "windows-latest"}
{"preset": "appleclang-release", "runner": "macos-latest"}
]

build-and-test:
Expand Down Expand Up @@ -89,14 +87,6 @@ jobs:
"tests": [{ "stdlibs": ["libstdc++"], "tests": ["Release.Default"]}]
}
]
},
{
"versions": ["12", "11"],
"tests": [
{ "cxxversions": ["c++23", "c++20"],
"tests": [{ "stdlibs": ["libstdc++"], "tests": ["Release.Default"]}]
}
]
}
],
"clang": [
Expand Down Expand Up @@ -137,26 +127,6 @@ jobs:
]
}
]
},
{ "versions": ["18"],
"tests": [
{ "cxxversions": ["c++26", "c++23", "c++20"],
"tests": [{"stdlibs": ["libc++"], "tests": ["Release.Default"]}]
},
{ "cxxversions": ["c++23", "c++20"],
"tests": [{"stdlibs": ["libstdc++"], "tests": ["Release.Default"]}]
}
]
},
{ "versions": ["17"],
"tests": [
{ "cxxversions": ["c++26", "c++23", "c++20"],
"tests": [{"stdlibs": ["libc++"], "tests": ["Release.Default"]}]
},
{ "cxxversions": ["c++20"],
"tests": [{"stdlibs": ["libstdc++"], "tests": ["Release.Default"]}]
}
]
}
],
"appleclang": [
Expand All @@ -167,22 +137,6 @@ jobs:
}
]
}
],
"msvc": [
{ "versions": ["latest"],
"tests": [
{ "cxxversions": ["c++23"],
"tests": [
{ "stdlibs": ["stl"],
"tests": [
"Debug.Default", "Release.Default", "Release.MaxSan",
"Debug.-DBEMAN_EXPECTED_USE_MODULES=On"
]
}
]
}
]
}
]
}

Expand Down
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
Loading
Loading