
Of course if you do that you're no longer insulated from which libraries are modular and which aren’t. Yeah, this is my point. As a user, I don’t mind some additional typings but prefer to see things explicitly and clearly. Thanks, Chuanqi
From:Peter Dimov
Rather, my current thinking is that we want this for user code:
#include
#include #include On the one hand, I feel the readability is not so good. On the other hand, the standard wording may not want this:
In a module unit, all module-import-declarations and export-declarations exporting module-import-declarations shall appear before all other declarations in the declaration-seq of the translation-unit and of the private- module-fragment (if any). That's in a module unit, which the above isn't. In a module unit, you'd just write import boost.mp11; import boost.core; import std; because you know you're using modules. Of course if you do that you're no longer insulated from which libraries are modular and which aren't. If the abovementioned headers are written "correctly", the requirement can be met even with the include form, provided that the includes are sorted so that all modular libraries come before all non-modular ones. This is the reverse of the usual order though.