harrand / Topaz

C++20 Game Engine
https://harrand.github.io/Topaz/
MIT License
35 stars 3 forks source link

C++20 Module Support #61

Open harrand opened 1 year ago

harrand commented 1 year ago

Blocked by:

Given the amount of api-breaking changes this will introduce, this is almost certainly a candidate for a new major version. Topaz 4.0 or perhaps even Topaz 5.0

harrand commented 1 year ago

This has seen some progress: import CMake, CMake and C++20 Modules - Bill Hoffman - CppCon 2022

C++20 does bring modules support, and the link above is promising. However, modules for the standard library does not exist in C++20, that's C++23. Seems a little silly to go through all the effort of introducing modules only to still have to use headers for the standard library, which is ubiquitous.

For this reason, C++23 Standard Library Modules blocks this task. As Topaz 4.0 is a rewrite which I want to be starting around now (see Topaz4.0-dev branch), it is not likely to make 4.0. Will leave this open for now though, although expect it to change milestones to a theoretical Topaz-5.0 if that ever becomes a thing.

harrand commented 1 year ago

Doesn't belong in Topaz 4.0. Will be another major release.

harrand commented 10 months ago

As of Oct 2023, CMake 3.28 now has non-experimental support for C++20 modules, thanks to GCC finally getting the necessary merges.

It's not set-in-stone, but the prospect of refactoring Topaz into modules is alot more likely to happen before I die of old age. Will certainly require a major release, and require an absolute ton of work (at this point I would expect major rewrites to the whole codebase). Topaz 5.0 potentially, but more likely Topaz 6.0, or even 7.