C++ Logo

std-discussion

Advanced search

Re: Global array of objects over multiple files

From: Thiago Macieira <thiago_at_[hidden]>
Date: Thu, 17 Oct 2024 11:03:27 -0700
On Thursday 17 October 2024 10:21:20 GMT-7 Federico Kircheis via Std-
Discussion wrote:
> The compiler could create the array through other means, for example
> through a "whole-program-analysis" and even create a constexpr array.

That's an alternative when whole-program analysis is possible. But for most
projects, in most situations, whole-program analysis is not possible, so that
remains a corner-case implementation detail, not the mainstream.

For everyone else who would need the linkers to join multiple TUs' contents
together, what are the limitations?

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Principal Engineer - Intel DCAI Platform & System Engineering

Received on 2024-10-17 18:03:36