-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
export operator new
and operator delete
#4644
Comments
Oh, perhaps I was wrong. They should be properly made available in the |
@cdacamar, is this a Stuff Just Works scenario? I can't control your implicit declarations emitted by the compiler. |
This does fall under the "it just works" scenario for MSVC. One possible workaround would be to move the vcruntime header to the GMF and do something like: export using ::operator new;
export using ::operator delete; To enable users to access them from the module interface. |
This also affects |
Could we adopt By removing
|
At this point I haven't yet validated Clang with |
IMO |
It is at least for MSVC and clang-cl, if you declare |
Since |
FYI. According to llvm/llvm-project#98583, Since Clang 19 landed the exception and added all options that are required to build C++ Modules, clang-cl /EHsc /std:c++latest -Wno-reserved-module-identifier -Wno-include-angled-in-module-purview -fprebuilt-module-path=. -fmodule-output=std.pcm -x c++-module "%VCToolsInstallDir%/modules/std.ixx" -x c++ main.cpp /Fehello.exe Feel free to close this issue. |
operator new
andoperator delete
are exported invcruntime_new.h
But according to https://eel.is/c++draft/basic.stc.dynamic#general-2, there functions are implicitly declared in global scope in each translation unit and are attached to the global module. So re-exporting them may violates https://eel.is/c++draft/module.interface#6
Related llvm/llvm-project#90620.
The text was updated successfully, but these errors were encountered: