pcg-cpp
pcg-cpp copied to clipboard
Fix set_stream to use unsigned integer for inc_; Workaround for Windo…
…ws SDK header conflicts in pcg-cpp
The build was failing on Windows (MSVC) with error C2678 due to ambiguous 'operator|' calls.
Root cause: Windows SDK headers (winuser.h, winnt.h, etc.) define multiple operator| overloads for various enums. When using a literal integer '1' with pcg_extras types, the compiler cannot distinguish between PCG's custom operators and Windows' enum operators.
Solution: Explicitly cast the literal to 'itype' to resolve the ambiguity. This ensures the compiler selects the correct operator defined in pcg-cpp while maintaining full cross-platform compatibility for Linux and macOS.