summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--qxt-mini/powerset.hpp (renamed from compat/powerset.hpp)9
-rw-r--r--qxt-mini/qxtglobalshortcut_x11.cpp2
2 files changed, 6 insertions, 5 deletions
diff --git a/compat/powerset.hpp b/qxt-mini/powerset.hpp
index fa49307e..ebb02ba8 100644
--- a/compat/powerset.hpp
+++ b/qxt-mini/powerset.hpp
@@ -1,6 +1,6 @@
#pragma once
-#include "util.hpp"
+#include "compat/macros.hpp"
#include <type_traits>
#include <cinttypes>
@@ -14,13 +14,13 @@
template<typename t, int M, typename size_type_ = std::uintptr_t>
struct powerset final
{
- static_assert(is_integral_v<size_type_>, "");
+ static_assert(std::is_integral_v<size_type_>, "");
using size_type = size_type_;
static_assert(M > 0, "");
static_assert(M < sizeof(size_type[8]), "");
- static_assert((is_unsigned_v<size_type>) || M < sizeof(size_type)*8 - 1, "");
+ static_assert((std::is_unsigned_v<size_type>) || M < sizeof(size_type)*8 - 1, "");
using N = std::integral_constant<size_type, (size_type(1) << size_type(M))-1>;
static_assert((N::value & (N::value + 1)) == 0, "");
@@ -66,7 +66,8 @@ private:
};
template<typename t, typename... xs>
-auto make_powerset(const t& arg, const xs&... args)
+auto force_inline
+make_powerset(const t& arg, const xs&... args)
{
using cnt = std::integral_constant<std::uintptr_t, sizeof...(xs)+1>;
using p = powerset<t, cnt::value>;
diff --git a/qxt-mini/qxtglobalshortcut_x11.cpp b/qxt-mini/qxtglobalshortcut_x11.cpp
index d54e3605..12a69637 100644
--- a/qxt-mini/qxtglobalshortcut_x11.cpp
+++ b/qxt-mini/qxtglobalshortcut_x11.cpp
@@ -45,7 +45,7 @@
#include <X11/XKBlib.h>
#include <xcb/xcb.h>
-#include "compat/powerset.hpp"
+#include "powerset.hpp"
#include "compat/util.hpp"
#include <iterator>