Date: Fri, 12 Apr 2019 17:40:07 +0200
Ben Boeckel via Modules <modules_at_[hidden]> writes:
> This is fine because `import <hello/core.hpp>;` is semantically the
> same as `#include <hello/core.hpp>` *for the purposes of preprocessing*.
I don't think this is correct. There is at least the difference
in macro isolation. Consider:
#define NDEBUG
#include <hello/core.hpp> // Affected by NDEBUG.
And:
#define NDEBUG
import <hello/core.hpp>; // Isolated from NDEBUG.
> This is fine because `import <hello/core.hpp>;` is semantically the
> same as `#include <hello/core.hpp>` *for the purposes of preprocessing*.
I don't think this is correct. There is at least the difference
in macro isolation. Consider:
#define NDEBUG
#include <hello/core.hpp> // Affected by NDEBUG.
And:
#define NDEBUG
import <hello/core.hpp>; // Isolated from NDEBUG.
Received on 2019-04-12 17:40:15