Skip to content

C++20 compatible polyfill for <expected> - #155

Merged
Bronek merged 53 commits into
mainfrom
expected_polyfill
Sep 21, 2025
Merged

Bronek merged 53 commits into
mainfrom
expected_polyfill

Conversation

@Bronek

@Bronek Bronek commented Jan 18, 2025 •

Copy link
Copy Markdown
Member

Remove a major blocker for C++20 compatibility by providing a polyfill for <expected> header which will work in C++20 compilation mode with older compilers e.g. gcc 12, clang 16 or Visual Studio 2022.

This is meant to be full implementation of https://eel.is/c++draft/expected , along with extensive unit tests.

@Bronek Bronek added c++20 Support for C++20 work in progress Work in progress, a.k.a. early draft labels Jan 18, 2025
@Bronek
Bronek force-pushed the expected_polyfill branch from e6a5344 to acdd08e Compare January 18, 2025 21:14
@Bronek Bronek changed the title C++20 compatible polyfill for <expected> C++20 compatible polyfill for <expected> Jan 18, 2025
@codecov

codecov Bot commented Jan 18, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Bronek
Bronek force-pushed the expected_polyfill branch from 3971917 to 1ec1b3a Compare February 1, 2025 20:40
@Bronek
Bronek force-pushed the expected_polyfill branch 4 times, most recently from 950a56f to f01699f Compare February 1, 2025 23:08
@Bronek
Bronek force-pushed the expected_polyfill branch 8 times, most recently from 7bdf1fd to e2cf86f Compare February 2, 2025 12:18
@Bronek
Bronek force-pushed the expected_polyfill branch from 23e25ea to ee5158d Compare July 20, 2025 16:28
@Bronek
Bronek force-pushed the expected_polyfill branch from dee101b to aae61bc Compare July 20, 2025 18:48
@Bronek
Bronek marked this pull request as ready for review July 22, 2025 19:41
@Bronek
Bronek marked this pull request as draft July 22, 2025 19:42
@Bronek
Bronek force-pushed the expected_polyfill branch from 63ad1c2 to c07a178 Compare July 24, 2025 21:09
@Bronek
Bronek force-pushed the expected_polyfill branch 4 times, most recently from ec17c49 to 25dbf14 Compare July 26, 2025 12:30
@Bronek
Bronek marked this pull request as ready for review July 26, 2025 12:37
@Bronek
Bronek force-pushed the expected_polyfill branch from 25dbf14 to afdb9dc Compare July 26, 2025 12:47
@Bronek Bronek removed the work in progress Work in progress, a.k.a. early draft label Jul 29, 2025
Comment thread include/pfn/expected.hpp Resolved
Comment thread include/pfn/expected.hpp Resolved
@a1q123456

Copy link
Copy Markdown

LGTM

Comment thread tests/util/helper_types.hpp Resolved
Comment thread include/pfn/expected.hpp Resolved
Comment thread include/pfn/expected.hpp Resolved

@godexsoft godexsoft left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a couple of questions/suggestions but none are a blocker imo 👍

@Bronek

Bronek commented Aug 6, 2025

Copy link
Copy Markdown
Member Author

@atomgalaxy would you be able to check the noexcept extensions I've added to pfn/expected.hpp ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++20 Support for C++20

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants