Skip to content

Replace tl::expected with std::expected#8615

Closed
glebm wants to merge 4 commits into
diasurgical:masterfrom
glebm:std-expected
Closed

Replace tl::expected with std::expected#8615
glebm wants to merge 4 commits into
diasurgical:masterfrom
glebm:std-expected

Conversation

@glebm

@glebm glebm commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

Now that the project targets C++23, use the standard library's std::expected instead of the vendored tl::expected polyfill:

  • tl::expected -> std::expected, tl::unexpected/tl::make_unexpected -> std::unexpected
  • .map()/.map_error() -> .transform()/.transform_error()
  • #include <expected.hpp> -> #include , grouped with std headers
  • Remove 3rdParty/tl/expected.hpp (the tl target remains for function_ref.hpp)

glebm and others added 3 commits July 13, 2026 11:03
Now that the project targets C++23, use the standard library's
std::expected instead of the vendored tl::expected polyfill:

- tl::expected -> std::expected, tl::unexpected/tl::make_unexpected -> std::unexpected
- .map()/.map_error() -> .transform()/.transform_error()
- #include <expected.hpp> -> #include <expected>, grouped with std headers
- Remove 3rdParty/tl/expected.hpp (the tl target remains for function_ref.hpp)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@glebm

glebm commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator Author

Only PS4 and Xbox nxdk are failing. These toolchains haven't updated their libcxx in many years.

I think we should disable CI for these platforms until the toolchains are updated, otherwise we'll be stuck on old language level for who knows how long.

Tracking bugs for libcxx update:

Failing builds:

These toolchains haven't updated their libcxx in years.
Disables these CI builds in order to avoid being stuck on old language level support.

Once / if the toolchains are updated, we can re-enable these platforms.

Toolchain update bugs:
* PS4: OpenOrbis/OpenOrbis-PS4-Toolchain#262
* Xbox nxdk: XboxDev/nxdk-libcxx#3
@glebm
glebm marked this pull request as ready for review July 13, 2026 10:27
@glebm
glebm enabled auto-merge (rebase) July 13, 2026 10:27
@glebm
glebm requested a review from AJenbo July 13, 2026 10:31
@glebm

glebm commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator Author

To avoid rebasing 3 PRs every time, I'm consolidating this PR into the std-format one.

@glebm glebm closed this Jul 19, 2026
auto-merge was automatically disabled July 19, 2026 12:21

Pull request was closed

@AJenbo

AJenbo commented Jul 19, 2026

Copy link
Copy Markdown
Member

That's also kind of why I was reviewing that one first :)

@glebm
glebm deleted the std-expected branch July 19, 2026 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants