summaryrefslogtreecommitdiffhomepage
path: root/compat
diff options
context:
space:
mode:
Diffstat (limited to 'compat')
-rw-r--r--compat/arch.hpp1
-rw-r--r--compat/format.hpp10
-rw-r--r--compat/fpu.hpp1
3 files changed, 8 insertions, 4 deletions
diff --git a/compat/arch.hpp b/compat/arch.hpp
index 0b58b65a..a60f673e 100644
--- a/compat/arch.hpp
+++ b/compat/arch.hpp
@@ -42,4 +42,3 @@
# define FLOORMAT_ARCH_FPU_MASK
# include <xmmintrin.h>
#endif
-
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)
diff --git a/compat/fpu.hpp b/compat/fpu.hpp
index 1b3776f9..9433648a 100644
--- a/compat/fpu.hpp
+++ b/compat/fpu.hpp
@@ -1,5 +1,6 @@
#pragma once
#include "arch.hpp"
+#include <cfenv>
#ifdef __MINGW32__
extern "C" __declspec(dllimport) unsigned __cdecl _controlfp(unsigned, unsigned);