You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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, as imports can't come from an #include.
With regards to the #ifdef CPP2_USE_MODULES,
its #ifdef __cpp_modules branch of should happen after the GMF, and
its #else branch in the GMF.
No declaration can be exported. 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:
Sample code - distilled down to minimal essentials please
error: declaration of 'operator new' in module main follows declaration in the global module
example.cpp2(2,13): error: missing semicolon at end of declaration (at 'namespace')
example.cpp2(2,1): error: unexpected text at end of Cpp2 code section (at 'ns')
example.cpp2(2,0): error: parse failed for section starting here
Additional context
Add any other context about the problem here.
Describe the bug
A clear and concise description of what the bug is.
export module a;doesn't work in-pure-cpp2mode.#include "cpp2util.h"should be inserted in the GMF.Additional work might also be necessary.
CPP2_USE_MODULESshouldn't be defined while preprocessing it, asimports can't come from an#include.#ifdef CPP2_USE_MODULES,its
#ifdef __cpp_modulesbranch of should happen after the GMF, andits
#elsebranch in the GMF.exported. 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:
cppfrontlevel.cppfrontlevel.#include "cpp2util.h"also works in module units.exported.Additional context
Add any other context about the problem here.