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

CCMATH Module #723

Closed
wants to merge 5 commits into from
Closed

CCMATH Module #723

wants to merge 5 commits into from

Conversation

mborland
Copy link
Member

@NAThompson This is a minimal working example of turning ccmath into a module. On GCC you can compile the test with:

gcc ccmath_module_test.cpp ../include/boost/math/ccmath/ccmath.cpp -std=c++20 -fmodules-ts

I would effectively copy all existing code into one giant file that would serve as the entire module. Let me know what you think.

@NAThompson
Copy link
Collaborator

This is cool. Looks like most of the work will be to get the config into CI!

@NAThompson
Copy link
Collaborator

@mborland : Have you hit this one?

~/m/test ❯❯❯ g++ ccmath_module_test.cpp -I../include  ../include/boost/math/ccmath/ccmath.cpp -std=c++20 -fmodules-ts                      ✘ 1 ccmath_module ◼

ccmath_module_test.cpp:6:8: fatal error: module 'boost_math_ccmath' not found
import boost_math_ccmath;
~~~~~~~^~~~~~~~~~~~~~~~~
1 error generated.
../include/boost/math/ccmath/ccmath.cpp:102:72: error: template parameter redefines default argument
template <typename T, std::enable_if_t<!std::is_unsigned_v<T>, bool> = true>
                                                                       ^
../include/boost/math/ccmath/ccmath.cpp:32:72: note: previous default template argument defined here
template <typename T, std::enable_if_t<!std::is_unsigned_v<T>, bool> = true>
                                                                       ^
../include/boost/math/ccmath/ccmath.cpp:118:71: error: template parameter redefines default argument
template <typename T, std::enable_if_t<std::is_unsigned_v<T>, bool> = true>
                                                                      ^
../include/boost/math/ccmath/ccmath.cpp:35:71: note: previous default template argument defined here
template <typename T, std::enable_if_t<std::is_unsigned_v<T>, bool> = true>
                                                                      ^
2 errors generated.

@mborland
Copy link
Member Author

@mborland : Have you hit this one?

I get that error if I compile with Clang 13.0.0, but not with GCC 11.2.1.

@NAThompson
Copy link
Collaborator

@mborland : Ok, looks like modules are a bit of a way off; I suggest we just keep the PR open and periodically try it out with new compilers . . .

@mborland
Copy link
Member Author

Superseded by #783

@mborland mborland closed this May 22, 2022
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.

2 participants