C++ Logo

std-discussion

Advanced search

Re: 回复: 回复: 回复: Compile-time Variables and Stateful Meta-programming / STMP

From: Julien Villemure-Fréchette <julien.villemure_at_[hidden]>
Date: Mon, 14 Jul 2025 17:29:25 -0400
> There is a new idea: execute code after compiling, before running, called pre-execution.

We already have something that solve this: "constinit"

On July 14, 2025 4:14:00 a.m. EDT, SD SH via Std-Discussion <std-discussion_at_[hidden]> wrote:
>There is a new idea: execute code after compiling, before running, called pre-execution.
>Then we have 3 stages to run code:
>compile-time -> pre-execution -> runtime
>Pre-execution can use the result of compile-time code, while compile-time code cannot use the former,
>and runtime code is similar.
>Follow this idea, it won't break the existing compile-time features, and we can slove the problem before, and it costs less time than the last.
>
>Actually some projects and languages did it, such as Unreal Header Tool and build.rs of Rust.
>
>Do you think it's feasible or not?
>________________________________
>发件人: Std-Discussion <std-discussion-bounces_at_[hidden]> 代表 Thiago Macieira via Std-Discussion <std-discussion_at_[hidden]>
>发送时间: 2025年7月14日 1:08
>收件人: std-discussion_at_[hidden] <std-discussion_at_[hidden]>
>抄送: Thiago Macieira <thiago_at_[hidden]>
>主题: Re: [std-discussion] 回复: 回复: Compile-time Variables and Stateful Meta-programming / STMP
>
>On Sunday, 13 July 2025 11:26:56 Central Daylight Time SD SH via Std-
>Discussion wrote:
>> If this option breaks the features above, we should give this idea up.
>
>Ok, then it's settled.
>
>--
>Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
> Principal Engineer - Intel Platform & System Engineering
>
>
>
>--
>Std-Discussion mailing list
>Std-Discussion_at_[hidden]
>https://lists.isocpp.org/mailman/listinfo.cgi/std-discussion

Received on 2025-07-14 21:29:43