Код: Выделить всё
mod.cppmКод: Выделить всё
export module TestModule;
export struct Foo
{
char c;
};
Код: Выделить всё
#include
struct Foo;
import TestModule;
int main()
{
Foo f{'a'};
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79670778/are-forward-declarations-of-entities-to-be-imported-from-modules-legal[/url]
Мобильная версия