One more question: exporting a non class function fails to
error C7619: cannot export 'nonClassFunc1' as module partition 'Internal'
does not contribute to the exported interface of module unit 'ModTest'
firstFile.cpp
export module ModTest:One;
export class FirstClass {
public:
FirstClass();
int firstClassFunc();
};
export int nonClassFunc1(); // DOES NOT WORK
export int nonClassFunc2(){ return 9; } // WORKS
firstFile_impl.cpp
module ModTest:Internal;
import :One; // <========== Import `FirstClass`
import :Two; // <========== Import `SecondClass`
int FirstClass::firstClassFunc() { return 8; }
FirstClass::FirstClass()
{
SecondClass sec(this);
}
int nonClassFunc1() { return 9; } // --> C7619
What is wrong here?
Thank you!