-
Notifications
You must be signed in to change notification settings - Fork 246
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
[BUG] Modules support #269
Comments
I haven't seen anything about CPP2 having |
That's right. This is partly what this is about. I accidentally submitted it while editing. |
I just meant that I don't see this as a bug but as not yet implemented. |
I have updated the bug report. I could try implementing this. Where in the grammar should the
|
[[meta]]Timing note for @JohelEGP and @filipsajdak: As you can see I've started the preliminary work to implement UDTs, and I plan to do further major extension and cleanup in the remaining March weekends, plus probably a week of vacation to work on cppfront. So it might make sense to defer new/updated PRs until after March ends as things will quiet down again about three weeks from now, otherwise you'll probably find yourself with conflicts/rebasing. @JohelEGP Thanks! There's basic modules support in mixed Cpp1/Cpp2 files, and one reason I've put further modules support lower down the design/implementation backlog list is because GCC and Clang don't support them yet (though I know support is in progress). Modules is the only major feature of C++20 (or C++23) that is available on only one of the three major implementations (see Clang status)... even I think |
That makes sense. Thank you. I'm looking forward to your continued work. |
@hsutter I will continue and will do the rebate. I will be mainly focusing on bugs and fixes making my project compilable. |
Describe the bug
A clear and concise description of what the bug is.
export module a;
doesn't work in-pure-cpp2
mode.#include "cpp2util.h"
should be inserted in the GMF.Additional work might also be necessary.
CPP2_USE_MODULES
shouldn't be defined while preprocessing it, asimport
s can't come from an#include
.#ifdef CPP2_USE_MODULES
,its
#ifdef __cpp_modules
branch of should happen after the GMF, andits
#else
branch in the GMF.export
ed. It's not part of the grammar, and as such can't happen in the generated code.I suppose one can also run into an issue due to the lack of support for
inline
, similar to Fix duplicate symbol of cpp2::args() function #268.To Reproduce
Steps to reproduce the behavior:
cppfront
level.cppfront
level.#include "cpp2util.h"
also works in module units.export
ed.Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: