Skip to content

Move ostream operators to wasm namespace#8189

Merged
stevenfontanella merged 1 commit into
mainfrom
ostream-namespace
Jan 9, 2026
Merged

Move ostream operators to wasm namespace#8189
stevenfontanella merged 1 commit into
mainfrom
ostream-namespace

Conversation

@stevenfontanella
Copy link
Copy Markdown
Member

@stevenfontanella stevenfontanella commented Jan 9, 2026

Extending std with ostream operators is UB: https://en.cppreference.com/w/cpp/language/extending_std.html. Including these definitions in wasm is just as good because argument-dependent lookup will look it up using the argument's namespace which is always wasm anyway.

Also move MemoryOrder ostream operator from wasm.cpp to Print.cpp to match others.

@stevenfontanella stevenfontanella marked this pull request as ready for review January 9, 2026 22:37
@stevenfontanella stevenfontanella merged commit 9d01442 into main Jan 9, 2026
34 of 35 checks passed
@stevenfontanella stevenfontanella deleted the ostream-namespace branch January 9, 2026 22:54
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