diff options
Diffstat (limited to 'include/libfud.hpp')
-rw-r--r-- | include/libfud.hpp | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/include/libfud.hpp b/include/libfud.hpp index ceb1b20..a0b2909 100644 --- a/include/libfud.hpp +++ b/include/libfud.hpp @@ -18,31 +18,25 @@ #ifndef LIBFUD_HPP #define LIBFUD_HPP -#include "fud_status.hpp" // IWYU pragma: export +#include "fud_status.hpp" +#include "fud_result.hpp" +#include "fud_string.hpp" -#include "fud_result.hpp" // IWYU pragma: export - -#include "fud_memory.hpp" // IWYU pragma: export - -#include "fud_assert.hpp" // IWYU pragma: export - -#include "fud_array.hpp" // IWYU pragma: export - -#include "fud_c_file.hpp" // IWYU pragma: export - -#include "fud_fud_type_traits.hpp" // IWYU pragma: export - -#include "fud_string.hpp" // IWYU pragma: export - -#include "fud_unique_array.hpp" // IWYU pragma: export +namespace fud { -#include "fud_utf8.hpp" // IWYU pragma: export +Result<String, FudStatus> getEnv(const char* name); -#include "fud_utf8_iterator.hpp" // IWYU pragma: export +template<typename T> +concept CStringRepr = requires(T a) +{ + { a.c_str() } -> std::convertible_to<const char*>; +}; -namespace fud { - -void fud(); +template <CStringRepr T> +Result<String, FudStatus> getEnv(const T& name) +{ + return getEnv(name.c_str()); +} } |