The module usage sample code seems wrong, as it does not have any kind of import or pretty much nothing to do with modules. This is the code as I see it in the lesson:
#include
#include
using namespace std;
template
T add(T a, T b) {
return a + b;
}
int main() {
double f = add(1.23, 4.56);
int i = add(7, 42);
string s = add("one ", “two”);
cout <<
"double: " << f << “\n” <<
"int: " << i << “\n” <<
"string: " << s << “\n”;
return 0;
}
Course: C++20 STL Cookbook - Learn Interactively
Lesson: Avoid Re-Compiling Template Libraries with Modules