3 ms·
> Wait, does the C++ module proposal allow modules names to be different from their filenames? It sort of makes sense. The calling program specifies `foo.bmi`,
by lelanthran 5y ago
> Wait, does the C++ module proposal allow modules names to be different from their filenames?
It sort of makes sense. The calling program specifies `foo.bmi`, but compiling for ARM might look in "armv5/foo.bmi" while targeting x64 might look in "x64/foo.bmi", and that doesn't even take into account that there might be different debug and release versions.
- munch117 5y agoThat is very easily solved by not using modules for those things that cause issues, or by using a module facade over traditional C++. For your example, you could make a 'foo' module that pulls in an implementation from a traditional C++ source file, "armv5/foo_impl.h" or "x64/foo_impl.h", using preprocessor #if/#ifdef to choose the right one. Or you could even use a module backend, pulling in the implementation from either "foo_armv5.bmi" or "foo_x64.bmi".