Alan suggested investigating whether compile times can be reduced for translation units that include Reflection.hpp, which currently requires parsing all metadata-related includes due to BOOST_DESCRIBE_xxx() invocations.
Background
This issue originated from a discussion in PR #1130. Currently:
- Struct and enum definitions live in public include files.
BOOST_DESCRIBE_xxx() invocations live in Reflection.hpp (private, under src/lib/).
- Only .cpp files in src/lib/ include Reflection.hpp (currently ~4 files).
While this design already provides reasonable separation, there may be opportunities to further reduce compile time overhead.
Questions to investigate
- Can we forward-declare the internal entities that
BOOST_DESCRIBE_xxx() generates?
- Could we create a macro that forward-declares whatever entities the describe macros would create?
- Are there other techniques to encapsulate the describe metadata without requiring full definitions?
Additional considerations
Personally, I'm not fond of a solution that requires knowing the implementation details of Boost.Describe, especially since we are not having an issue with compile times.
Alan suggested investigating whether compile times can be reduced for translation units that include Reflection.hpp, which currently requires parsing all metadata-related includes due to
BOOST_DESCRIBE_xxx()invocations.Background
This issue originated from a discussion in PR #1130. Currently:
BOOST_DESCRIBE_xxx()invocations live in Reflection.hpp (private, under src/lib/).While this design already provides reasonable separation, there may be opportunities to further reduce compile time overhead.
Questions to investigate
BOOST_DESCRIBE_xxx()generates?Additional considerations
Personally, I'm not fond of a solution that requires knowing the implementation details of Boost.Describe, especially since we are not having an issue with compile times.