Closed urnathan closed 2 years ago
This will be taken care of when I merge the develop branch, but it's not ready for prime time yet. I'll try to get that in before 1.81.
Thanks Peter!
The develop branch has been merged now, so this should be resolved.
There is a cycle between container_hash/hash.hpp and container_hash/extensions.hpp. This is problematic for modules (both clang and C++ header units). This cycle is made acceptable by removing extensions.hpp's idempotency and have it pre-include hash.hpp if that's not already been included. Then, should hash.hpp include extensions.hpp the later conditional will nullify the (second) tokenization of extensions.hpp's body. This preserves the existing textual-header behaviour of the two files. But, it also makes them buildable as clang-headers, because the cycality remaining in the graph is unproblematic.
An alternative would be to move the body of extensions.hpp to extensions-impl.hpp, and have hash.hpp conditionally include that. Then turn extensions.hpp into a stub that include hash.hpp with BOOST_HASH_NO_EXTENSIONS undefined so it includes extensions-impl. that way extensions-impl.hpp and extensions.hpp can be idempotent (but hash.hpp has to remain not)