Skip to content
This repository was archived by the owner on Apr 16, 2025. It is now read-only.

Commit 392af80

Browse files
committed
The ValKind::operator<< uses ostream, but the include was missing. ostream is used so commonly that it's usually included by some other header. However, if you use wasmtime.hh as your first (or only) include, then you get a massive compile error on Apple toolchain compilers (I'm using xcode 16). The error does not reproduce on Linux.
The error when this include is missing is: ``` include/wasmtime.hh:519:32: error: invalid operands to binary expression ('std::ostream' (aka 'basic_ostream<char>') and 'const char[4]') 519 | WASMTIME_FOR_EACH_VAL_KIND(CASE_KIND_PRINT_NAME) third-party/wasmtime-cpp/include/wasmtime.hh:504:3: note: expanded from macro 'WASMTIME_FOR_EACH_VAL_KIND' 504 | X(I32, "i32", WASM_I32) \ | ^~~~~~~~~~~~~~~~~~~~~~~ third-party/wasmtime-cpp/include/wasmtime.hh:517:8: note: expanded from macro 'CASE_KIND_PRINT_NAME' 517 | os << name; \ ```
1 parent af885c2 commit 392af80

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

include/wasmtime.hh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#include <limits>
4141
#include <memory>
4242
#include <optional>
43+
#include <ostream>
4344
#include <variant>
4445
#include <vector>
4546
#ifdef __has_include

0 commit comments

Comments
 (0)