From 9d6677b74b0c6eab59de6a6f93e3b6553d93f4c1 Mon Sep 17 00:00:00 2001 From: Stephen Lane-Walsh Date: Sun, 24 Oct 2021 02:41:44 -0400 Subject: [PATCH] Add macros for retrieving Major/Minor/Patch from FMT_VERSION --- include/fmt/core.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/fmt/core.h b/include/fmt/core.h index 8e8d2f1c..579a9f2a 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -18,6 +18,10 @@ // The fmt library version in the form major * 10000 + minor * 100 + patch. #define FMT_VERSION 80001 +#define FMT_VERSION_MAJOR (FMT_VERSION / 10000) +#define FMT_VERSION_MINOR ((FMT_VERSION % 10000) / 100) +#define FMT_VERSION_PATCH ((FMT_VERSION % 10000) % 100) + #if defined (__clang__ ) && !defined(__ibmxl__) # define FMT_CLANG_VERSION (__clang_major__ * 100 + __clang_minor__) #else