Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allows using a pure modular build. #570

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

mordante
Copy link
Contributor

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.

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.
@@ -274,17 +284,23 @@ inline constexpr const std::string_view need_name =
"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)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would +1 the explicit symbol export, as it also causes troubles when building with MSVC, see here for an example.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy with that too ☝️

krzysztof-jusiak and others added 3 commits June 27, 2023 07:41
This attaches the named declaration to the global module fragment
instead of to the ut module.

Also avoids exporting the std module.
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.

3 participants