C++ Logo

sg16

Advanced search

Re: [isocpp-lib-ext] std::environment

From: Steve Downey <sdowney_at_[hidden]>
Date: Sun, 1 Jan 2023 23:42:00 -0500
I live in a mixed language environment and I have deep concerns about
environment variables that have documented effects in the C and POSIX
runtime.
Reading the wrong value in a convenient C++ API is not an improvement in my
life and seems more likely to produce subtle bugs.



On Sun, Jan 1, 2023, 22:48 Jeff Garland via SG16 <sg16_at_[hidden]>
wrote:

>
>
> On Jan 1, 2023, at 8:31 PM, Jayesh Badwaik via Lib-Ext <
> lib-ext_at_[hidden]> wrote:
>
> Can we have std::environment effectively as a data type and
> std::get_environment return a value of that type at that moment in time.,
> which now can be used as one sees fit?
>
>
> I was hoping to not create another data structure — we have plenty of
> those already. If we have get_environment return an appropriate range
> users should be able to use c++23 range_t collection constructors or
> ranges::to in a pipeline to create the collection of choice — say
> flat_map<string, string>.
>
> Jeff
> --
> SG16 mailing list
> SG16_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/sg16
>

Received on 2023-01-02 04:42:13