Boost logo

Boost :

Subject: Re: [boost] Environment Variables Library?
From: Boris Schäling (boris_at_[hidden])
Date: 2015-05-18 07:39:41


On Mon, 18 May 2015 11:37:00 +0200, Michael Ainsworth
<michael_at_[hidden]> wrote:

> Two primary purposes, two ideas for additional possible uses.
>
> Primary purposes:
>
> 1. To provide cross platform (e.g., POSIX plus Windows) equivalents of
> setenv, getenv, "unsetenv" and "issetenv".
> 2. To allow iteration over all defined environment variables.
>
> Additional possible uses:
>
> 1. To create a new environment to pass to a new process.
> 2. To provide non "char" based environment variables (e.g.,
> std::wstring).
>
> All input appreciated.

There is a so-called environment iterator in Boost.ProgramOptions (see
<http://www.boost.org/doc/libs/1_58_0/doc/html/boost/environment_iterator.html>).
And the library that should have become Boost.Process has support for
passing environment variables to a new process (including std::wstring;
see
<http://www.highscore.de/boost/process0.5/boost_process/tutorial.html#boost_process.tutorial.inheriting_environment_variables>).

Boris

> [...]


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk