Allows using a pure modular build.#570
Open
mordante wants to merge 4 commits intoboost-ext:masterfrom
Open
Conversation
This allows the user to force modules to be used. Since the std module is enable it's not needed to include the Standard library headers. Clang 17 does not work properly in this case, so allow users to avoid these includes. Note static_asserts can't be exported so they are disabled.
mordante
commented
Jun 18, 2023
| "unique_name_for_auto_detect_prefix_and_suffix_lenght_0123456789_struct"; | ||
| #endif | ||
| inline constexpr const std::size_t need_length = need_name.length(); | ||
| #if not defined(BOOST_UT_USE_MODULE) |
Contributor
Author
There was a problem hiding this comment.
Note this is not great. I think to solve this properly the selection of which declarations to export and not to export needs a rework. Either exporting in a smaller scope than the entire boost::ut namespace or using using namespace::declaration at the end of the header.
There was a problem hiding this comment.
I would +1 the explicit symbol export, as it also causes troubles when building with MSVC, see here for an example.
Contributor
There was a problem hiding this comment.
I'm happy with that too ☝️
This attaches the named declaration to the global module fragment instead of to the ut module. Also avoids exporting the std module.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This allows the user to force modules to be used. Since the std module is enable it's not needed to include the Standard library headers. Clang 17 does not work properly in this case, so allow users to avoid these includes.
Note static_asserts can't be exported so they are disabled.