diff options
author | Dominick Allen <djallen@librehumanitas.org> | 2024-10-02 20:18:20 -0500 |
---|---|---|
committer | Dominick Allen <djallen@librehumanitas.org> | 2024-10-02 20:18:20 -0500 |
commit | 97bbafb762defc01abc38834b70a7e8f20d654f5 (patch) | |
tree | 1f80933eee00e047d4baab53020e6c7346c5a4ce /include | |
parent | 167187c4438db1a8612580e627019e8ab311ae46 (diff) |
Define fud to return version info.
Diffstat (limited to 'include')
-rw-r--r-- | include/libfud.hpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/include/libfud.hpp b/include/libfud.hpp index 271d55b..c4fa8d7 100644 --- a/include/libfud.hpp +++ b/include/libfud.hpp @@ -18,14 +18,25 @@ #ifndef LIBFUD_HPP #define LIBFUD_HPP -#include "fud_status.hpp" #include "fud_result.hpp" +#include "fud_status.hpp" #include "fud_string.hpp" +#include <cstdint> + namespace fud { +struct FUD { + uint8_t Major; + uint8_t Minor; + uint8_t Patch; +}; + /** \brief Fear, unknown, doubt. Call at your own peril. */ -void fud(); +constexpr FUD fud() +{ + return FUD{0, 42, 0}; +} /** * \brief Get an environmental variable if it exists. @@ -38,9 +49,8 @@ void fud(); */ Result<String, FudStatus> getEnv(const char* name); -template<typename T> -concept CStringRepr = requires(T a) -{ +template <typename T> +concept CStringRepr = requires(T a) { { a.c_str() } -> std::convertible_to<const char*>; }; |