summaryrefslogtreecommitdiffhomepage
path: root/compat
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
parent67f0ff04d0fb71255d35bf7f31a684d7a2120c2a (diff)
add github action
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);