halcheck 1.0
Loading...
Searching...
No Matches

◆ getenv() [2/2]

template<typename T >
lib::optional< T > halcheck::lib::getenv ( const std::string & name)

Gets the value of an environment variable.

Template Parameters
TThe type of value to read.
Parameters
nameThe name of the environment variable to get.
Returns
Returns lib::nullopt if the environment variable is not set or the environment variable does not contain a value of type T. Otherwise, returns a T containing the value of the environment variable.