cppfront icon indicating copy to clipboard operation
cppfront copied to clipboard

[BUG] cpp1 module declaration must be at beginning of generated .cpp file

Open abuehl opened this issue 11 months ago • 7 comments

If the (mixed) .cpp2 input-file begins with a C++20 module declaration, e.g.

module foo;

the generated .cpp file is not valid C++20.

The file begins with various #includes and declarations, followed by the invalidly placed module declaration.

Also, #include's should be placed in the global module fragment.

abuehl avatar Jan 26 '25 21:01 abuehl