Skip to content

Fix issues that break MSVC strict compilation#294

Open
oznogon wants to merge 1 commit intodaid:masterfrom
oznogon:fix-strict-compilation
Open

Fix issues that break MSVC strict compilation#294
oznogon wants to merge 1 commit intodaid:masterfrom
oznogon:fix-strict-compilation

Conversation

@oznogon
Copy link
Contributor

@oznogon oznogon commented Feb 19, 2026

The /permissive- flag that appears in CMakeLists.txt seems to be ignored, discarded, or no-op on MSVC builds. The resulting errors block compilation.

  • Add an explicit public default constructor to ComponentStorage to avoid no appropriate default constructor available errors
  • Explicitly define the static inline ComponentStorage member named storage, instead of only declaring it, to avoid use of undefined type 'sp::ecs::ComponentStorage<...>' errors
  • Use _WIN32 instead of WIN32 in preprocessor ifdefs; MSVC 18 doesn't appear to define WIN32
  • Explicitly instantiate multiplayerReplicationFunctions templates
  • Explicitly cast sparseset data to uint32_t

These changes should have no impact on non-MSVC builds, and would contribute toward unblocking MSVC as a compiler.

- Add an explicit public default constructor to ComponentStorage
  to avoid "no appropriate default constructor available" errors
- Explicitly define the static inline ComponentStorage member
  named storage, instead of only declaring it, to avoid
  "use of undefined type 'sp::ecs::ComponentStorage<...>'" errors
- Use _WIN32 instead of WIN32 in preprocessor ifdefs; MSVC 18
  doesn't appear to define WIN32.
- Explicitly instantiate multiplayerReplicationFunctions templates.
@oznogon oznogon force-pushed the fix-strict-compilation branch from 81c6783 to 50b63c6 Compare March 4, 2026 00:41
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.

1 participant