$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2006-01-19 20:26:36
Aaron Griffin wrote:
>std::string get_env(std::string const& name)
>{
>   char* var = getenv(name.c_str());
>   //getenv can return NULL, std::string(NULL) throws
>   if(var) return var;
>   else return "";
>}
>  
>
An empty environment variable is not exactly the same as a non-existent 
one. Perhaps like this:
boost::optional<std::string> get_env(std::string const &name)
{
  char *var = getenv(name.c_str());
  if(var) return var;
  else return boost::nothing;
}