Go to the documentation of this file.
9 #ifndef EAGINE_ENVIRONMENT_HPP
10 #define EAGINE_ENVIRONMENT_HPP
23 if(
auto value = ::getenv(
c_str(variable_name))) {
31 #endif // EAGINE_ENVIRONMENT_HPP
basic_string_span< const char > string_view
Alias for const string views.
Definition: string_span.hpp:116
static constexpr auto c_str(memory::basic_span< C, P, S > s) -> std::enable_if_t< std::is_convertible_v< memory::basic_span< C, P, S >, basic_string_span< C, P, S >>, basic_c_str< C, P, S >>
Functions that construct a basic_c_str from a basic_string_span.
Definition: string_span.hpp:226
Common code is placed in this namespace.
Definition: eagine.hpp:21
Primary template for conditionally valid values.
Definition: decl.hpp:49
static auto get_environment_variable(string_view variable_name) noexcept -> optionally_valid< string_view >
Returns the value in the specified environment variable.
Definition: environment.hpp:21