https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124888

--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
N.B. it works if you just use 'import std;' instead of #include <functional>
(and like Clang and MSVC, we support the std module in C++20 as well as C++23).

To import std you either need to use --compile-std-module when compiling the
file that imports it, or do this first:

g++ -std=xxx -fmodules -fsearch-include-path bits/std.cc -fmodule-only -c



It also works if you use 'import <functional>;' and for that you need to do
this:

g++ -std=xxx -fmodules -fsearch-include-path -x c++-system-header functional
-fmodule-only -c

Reply via email to