C++ Logo


Advanced search

Header units and dependency scanning

From: Daniel Ruoso <daniel_at_[hidden]>
Date: Thu, 9 Jun 2022 13:30:50 -0400
I'm continuing my effort to create a coherent mental model of how
header units need to work, and I just realized something that looks

Let's suppose you have the header foo.h:

#define SOMETHING 1

Now, let's suppose you have another header, let's say bar.h, with:

import <foo.h>
import <something.h>
import <somethingelse.h>

Let's suppose both `foo.h` and `bar.h` are importable headers.

In the dependency scanning phase, we're not expected to have a bmi for
all units yet, since we don't know the order in which we're meant to
process them.

How is the dependency scanning supposed to work in that case?

Or am I fundamentally misunderstanding how this works?


Received on 2022-06-09 17:31:02