Skip to content

Update from C++17 to C++20#8218

Merged
sbc100 merged 1 commit into
mainfrom
cxx20
Mar 30, 2026
Merged

Update from C++17 to C++20#8218
sbc100 merged 1 commit into
mainfrom
cxx20

Conversation

@sbc100

@sbc100 sbc100 commented Jan 17, 2026

Copy link
Copy Markdown
Member

As a test I converted all the set::count calls to set::contains when
they were used for membership testing.

@sbc100 sbc100 force-pushed the cxx20 branch 2 times, most recently from 5973b98 to 86d1856 Compare January 17, 2026 23:35
@sbc100 sbc100 requested a review from tlively January 17, 2026 23:38
@sbc100

sbc100 commented Jan 17, 2026

Copy link
Copy Markdown
Member Author

Is it time?

@tlively

tlively commented Jan 18, 2026

Copy link
Copy Markdown
Member

Sounds good to me. I wonder what's up with ICE in wasm-type-printer.h. Maybe try removing assertValidUsage, or at least excluding it in the MSVC build?

@kripken

kripken commented Jan 20, 2026

Copy link
Copy Markdown
Member

See #6060 (comment) from @dschuff about c++20

@dschuff

dschuff commented Jan 20, 2026

Copy link
Copy Markdown
Member

Yeah, that's something to look into. Also it looks like there are some other gcc-isms like the -fno-rrti flag that also need to be filtered out.

@sbc100 sbc100 requested a review from a team as a code owner March 30, 2026 18:58
sbc100 added a commit that referenced this pull request Mar 30, 2026
This matches the C++20 API that we cannot quite use yet.  At least not
until #8218 lands.
sbc100 added a commit that referenced this pull request Mar 30, 2026
This matches the C++20 API that we cannot quite use yet.  At least not
until #8218 lands.
@sbc100 sbc100 force-pushed the cxx20 branch 2 times, most recently from 91760b9 to e29758c Compare March 30, 2026 21:09
sbc100 added a commit that referenced this pull request Mar 30, 2026
This matches the C++20 API that we cannot quite use yet.  At least not
until #8218 lands.
sbc100 added a commit that referenced this pull request Mar 30, 2026
This matches the C++20 API that we cannot quite use yet.  At least not
until #8218 lands.
sbc100 added a commit that referenced this pull request Mar 30, 2026
This matches the C++20 API that we cannot quite use yet. At least not
until #8218 lands.
As a test I converted all the `set::count` calls to `set::contains` when
they were used for membership testing.
@sbc100 sbc100 merged commit b6eba84 into main Mar 30, 2026
15 checks passed
@sbc100 sbc100 deleted the cxx20 branch March 30, 2026 23:53
sbc100 added a commit to WebAssembly/wabt that referenced this pull request Jun 23, 2026
Binaryen did this a while back in
WebAssembly/binaryen#8218.

There we a couple of issue related to building on macOS 13.2.1 but
I don't think we need to support building on such old versions of
macOS here.  We still support deploying to macOS 10.14 via
CMAKE_OSX_DEPLOYMENT_TARGET.

Use std::string::starts_with and std::string_view::starts_with in
various places now that C++20 is available.

Also, adopt `.contains()` for std::map, std::set, and their unordered
counterparts to replace verbose find/end and count checks.

Also, bump gtest submodule from 1.12.0 to 1.17.0 to fix some new
compiler warnings.
sbc100 added a commit to WebAssembly/wabt that referenced this pull request Jun 23, 2026
Binaryen did this a while back in
WebAssembly/binaryen#8218.

There we a couple of issue related to building on macOS 13.2.1 but
I don't think we need to support building on such old versions of
macOS here.  We still support deploying to macOS 10.14 via
CMAKE_OSX_DEPLOYMENT_TARGET.

Use std::string::starts_with and std::string_view::starts_with in
various places now that C++20 is available.

Also, adopt `.contains()` for std::map, std::set, and their unordered
counterparts to replace verbose find/end and count checks.

Also, bump gtest submodule from 1.12.0 to 1.17.0 to fix some new
compiler warnings.
sbc100 added a commit to WebAssembly/wabt that referenced this pull request Jun 23, 2026
Binaryen did this a while back in
WebAssembly/binaryen#8218.

There we a couple of issue related to building on macOS 13.2.1 but
I don't think we need to support building on such old versions of
macOS here.  We still support deploying to macOS 10.14 via
CMAKE_OSX_DEPLOYMENT_TARGET.

Use std::string::starts_with and std::string_view::starts_with in
various places now that C++20 is available.

Also, adopt `.contains()` for std::map, std::set, and their unordered
counterparts to replace verbose find/end and count checks.

Also, bump gtest submodule from v1.12.0 to v1.17.0 to fix some new
compiler warnings.
sbc100 added a commit to WebAssembly/wabt that referenced this pull request Jun 23, 2026
Binaryen did this a while back in
WebAssembly/binaryen#8218.

There we a couple of issue related to building on macOS 13.2.1 but
I don't think we need to support building on such old versions of
macOS here.  We still support deploying to macOS 10.14 via
CMAKE_OSX_DEPLOYMENT_TARGET.

Use std::string::starts_with and std::string_view::starts_with in
various places now that C++20 is available.

Also, adopt `.contains()` for std::map, std::set, and their unordered
counterparts to replace verbose find/end and count checks.
sbc100 added a commit to WebAssembly/wabt that referenced this pull request Jun 23, 2026
Binaryen did this a while back in
WebAssembly/binaryen#8218.

There we a couple of issue related to building on macOS 13.2.1 but
I don't think we need to support building on such old versions of
macOS here.  We still support deploying to macOS 10.14 via
CMAKE_OSX_DEPLOYMENT_TARGET.

Use std::string::starts_with and std::string_view::starts_with in
various places now that C++20 is available.

Also, adopt `.contains()` for std::map, std::set, and their unordered
counterparts to replace verbose find/end and count checks.
sbc100 added a commit to WebAssembly/wabt that referenced this pull request Jun 23, 2026
Binaryen did this a while back in
WebAssembly/binaryen#8218.

There we a couple of issue related to building on macOS 13.2.1 but
I don't think we need to support building on such old versions of
macOS here.  We still support deploying to macOS 10.14 via
CMAKE_OSX_DEPLOYMENT_TARGET.

Use std::string::starts_with and std::string_view::starts_with in
various places now that C++20 is available.

Also, adopt `.contains()` for std::map, std::set, and their unordered
counterparts to replace verbose find/end and count checks.
sbc100 added a commit to WebAssembly/wabt that referenced this pull request Jun 23, 2026
Binaryen did this a while back in
WebAssembly/binaryen#8218.

There we a couple of issue related to building on macOS 13.2.1 but I
don't think we need to support building on such old versions of macOS
here. We still support deploying to macOS 10.14 via
CMAKE_OSX_DEPLOYMENT_TARGET.

Use std::string::starts_with and std::string_view::starts_with in
various places now that C++20 is available.

Also, adopt `.contains()` for std::map, std::set, and their unordered
counterparts to replace verbose find/end and count checks.
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.

4 participants