Teuchos - Trilinos Tools Package Version of the Day
Loading...
Searching...
No Matches
Teuchos_EnvVariables.hpp
1// @HEADER
2// *****************************************************************************
3// Teuchos: Common Tools Package
4//
5// Copyright 2004 NTESS and the Teuchos contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10#ifndef TEUCHOS_ENVVARIABLES_HPP
11#define TEUCHOS_ENVVARIABLES_HPP
12
13#include <string_view>
14
15namespace Teuchos {
16
17bool idempotentlyGetNamedEnvironmentVariableAsBool(
18 const char name[], bool &initialized, const char environmentVariableName[],
19 const bool defaultValue);
20
32template <typename T>
34 T &value, bool &initialized, const std::string_view environmentVariableName,
35 const T defaultValue);
36
37} // namespace Teuchos
38
39#endif
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...
T idempotentlyGetEnvironmentVariable(T &value, bool &initialized, const std::string_view environmentVariableName, const T defaultValue)
Read a variable from the environment. Example usage: