I have 3 files, namely engineering.cpp, engineering.ixx and system.ixx. Contents briefly are:
system.ixx:
export module sys;
export import :engineering;
engineering.ixx
module;
#include <string>
#include <vector>
export module sys:engineering;
namespace sys::engineering
{
export class Psychrometry
{
//more code here
}
}
engineering.cpp
module;
#include <sstream>
module sys:engineering;
namespace sys::engineering
{
//implementation of the class
}
In another cpp file I use it as:
import sys;
sys::engineering::Psychrometry psy;
The project compiles and works well but in engineering.cpp intellisense gives 99+ errors and code-completion and other basic facilities dont work.
However, if I make the following change to engineering.cpp:
//instead of module sys:engineering
module sys;
Now intellisense works well and the project still compiles and works. However, to my understanding the first approach (module sys:engineering) is correct rather than (module sys).
What am I missing? Thanks in advance.
(Visual Studio Community 2022 (64-bit) - Current Version 17.2.6)