diff options
Diffstat (limited to 'include/libfud.hpp')
-rw-r--r-- | include/libfud.hpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/libfud.hpp b/include/libfud.hpp index f0a2517..542c836 100644 --- a/include/libfud.hpp +++ b/include/libfud.hpp @@ -18,8 +18,9 @@ #ifndef LIBFUD_HPP #define LIBFUD_HPP -#include "fud_array.hpp" #include "fud_allocator.hpp" +#include "fud_array.hpp" +#include "fud_option.hpp" #include "fud_result.hpp" #include "fud_status.hpp" #include "fud_string.hpp" @@ -55,7 +56,7 @@ FUD fud(); * \returns FudStatus::NullPointer if name is a null pointer. * \returns FudStatus::NotFound if no binding for the variable exists. */ -Result<String, FudStatus> getEnv(const char* name, Allocator* allocator= &globalFudAllocator); +Result<Option<String>, FudStatus> getEnv(const char* name, Allocator* allocator = &globalFudAllocator); /** \brief A concept requiring the object T to have a method c_str returning a * pointer to a C string. */ @@ -75,7 +76,7 @@ concept CStringRepr = requires(T strObj) { * \returns @getEnv return values. */ template <CStringRepr T> -Result<String, FudStatus> getEnv(const T& name, Allocator* allocator = &globalFudAllocator) +Result<Option<String>, FudStatus> getEnv(const T& name, Allocator* allocator = &globalFudAllocator) { return getEnv(name.c_str(), allocator); } |