From 97bbafb762defc01abc38834b70a7e8f20d654f5 Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Wed, 2 Oct 2024 20:18:20 -0500 Subject: Define fud to return version info. --- include/libfud.hpp | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'include/libfud.hpp') 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 + 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 getEnv(const char* name); -template -concept CStringRepr = requires(T a) -{ +template +concept CStringRepr = requires(T a) { { a.c_str() } -> std::convertible_to; }; -- cgit v1.2.3