C++ Logo

std-proposals

Advanced search

Re: [std-proposals] constexpr support in std::filesystem API

From: Andrei Grosu <andrei_dg_at_[hidden]>
Date: Tue, 12 Mar 2024 16:33:21 +0200
Thank you, that’s pretty interesting actually and good advice.
  My target environemnt (containers / linux) has all the tools to sandbox and secure the process, but for the general case, indeed, a ‘sandbox’ concept for the compiler is needed.

On Tue, Mar 12, 2024, at 16:24, Thiago Macieira via Std-Proposals wrote:
> On Tuesday, 12 March 2024 06:54:50 PDT Jonathan Wakely via Std-Proposals
> wrote:
>> > And you're not talking about a standard feature that could probably be
>> > disabled by non-standard flags in compilers, you're suggesting it
>> > should be off by default and enabled by a flag. That's not the same
>> > thing as exceptions and RTTI at all.
>>
>> If it needs to be off by default, it probably shouldn't be in the standard.
>>
>> Maybe try implementing it in one of the open source compilers to
>> demonstrate it's doable and useful, and to get experience with the
>> feature and the problems it can create.
>
> I suggest this feature can be made narrower by allowing "file" or "resource"
> access and listing via implementation-defined means. Whether a given compiler
> accesses files on the filesystem or not is therefore not explicit in the
> standard.
>
> I'd advise compilers that they require a command-line option to set the
> directory(ies) where such files can be found, like the -I flags for the
> preprocessor. If no such option is passed, then the API exists and works, but
> finds no content and therefore can open no files. An alternative is that the
> option points to a manifest file, which contains all acceptable paths that can
> be opened and thus also contains all the entries that can be listed. This
> could also be a .tar or .zip file.
>
> Is this useful to the OP? No idea, the use-case isn't very clear yet. This is
> a solution to a problem, not a description to the problem that needs solving.
>
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
> Principal Engineer - Intel DCAI Cloud Engineering
>
>
>
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals

Received on 2024-03-12 14:33:41