summaryrefslogtreecommitdiffhomepage
path: root/compat/format.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-11-10 17:01:30 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-11-10 22:17:43 +0100
commit0e23ba9e5a565e34fee0f024e29ce162f420ec22 (patch)
treeeeaf0ec198ba8849117c9c21675a651e8c93acad /compat/format.hpp
parent67f0ff04d0fb71255d35bf7f31a684d7a2120c2a (diff)
add github action
Diffstat (limited to 'compat/format.hpp')
-rw-r--r--compat/format.hpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/compat/format.hpp b/compat/format.hpp
index 0ebb3e18..dbf86e1e 100644
--- a/compat/format.hpp
+++ b/compat/format.hpp
@@ -2,8 +2,8 @@
#include <fmt/core.h>
#include <fmt/compile.h>
+#ifndef _MSC_VER
namespace floormat::detail::fmt {
-
template<std::size_t N>
struct fmt_string final {
static constexpr std::size_t size = N;
@@ -15,16 +15,20 @@ struct fmt_string final {
data[i] = arr[i];
}
};
-
} // namespace floormat::detail::fmt
+#endif
namespace floormat {
-template<detail::fmt::fmt_string s>
+#ifndef _MSC_VER
+template<::floormat::detail::fmt::fmt_string s>
consteval auto operator""_cf() noexcept
{
return FMT_COMPILE(s.data);
}
+#else
+using namespace fmt::literals;
+#endif
template<std::size_t N, typename Fmt, typename... Xs>
std::size_t snformat(char(&buf)[N], Fmt&& fmt, Xs&&... args)