C++ Logo

std-proposals

Advanced search

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

From: Sebastian Wittmeier <wittmeier_at_[hidden]>
Date: Tue, 12 Mar 2024 13:11:36 +0100
Simple?   Besides the technicalities, this proposal would really complicate dependency management for build systems.   Files could be loaded from outside the build directory. Filepaths could depend on the contents of read files.   I am not saying that there is not any value in the idea, but a lot of considerations have to be taken in account.   E.g. limit file access to a certain folder (chroot), provide a (black/white) list of files, which can be read in this manner to limit possible dependencies.   Are there alternatives? E.g.  - reading files with #embed and - dynamically during compile time - choose, which embedded file to use  - compile and afterwards run the 'build system c++ source code' by the make utility instead of running it by the compiler at compile time  - interpreted C++ as script language   Other points:  - security (arbitrary file access)  - where to stop - should compile-time C++ use internet connections and have a 3D UI? Should it receive parameters from cloud-connected mobile devices with AI speech recognition? Should it be able to control robots? We need a vision, what compile time C++ is and what it is not   -----Ursprüngliche Nachricht----- Von:Andrei Grosu via Std-Proposals <std-proposals_at_[hidden]> Gesendet:Di 12.03.2024 12:31 Betreff:[std-proposals] constexpr support in std::filesystem API An:std-proposals_at_[hidden]; CC:Andrei Grosu <andrei_dg_at_[hidden]>; The proposal is simple: constexpr support for the filesystem API. The need comes from writing a build system in (modern) C++. If there is support for compile-time access to the filesystem , it would be , in my opinion, the key  missing piece for a build system implemented in modern C++. Without that you would have to depend on code generation , but with it , there is not much missing to build a fully featured build system in C++ itself. Is this a question of compiler complexity , to enable constexpr filesystem access ? It is not clear to me if there are other factors at play. Can anyone ‘in the know’ share some insights why it might or might not be feasable ? -- Std-Proposals mailing list Std-Proposals_at_[hidden] https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals

Received on 2024-03-12 12:11:38