diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-01-18 12:23:53 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-01-18 12:34:58 +0100 |
commit | 11ef6b48676c52a42a81f1f5ee021cb37e728800 (patch) | |
tree | df11e6e50554dcf8c075d91d56b723ec22dc867a | |
parent | 682eaa51a76605c028a844acb1cfe7dbfa0ab945 (diff) |
compat: move powerset.hpp to qxt-mini/
-rw-r--r-- | qxt-mini/powerset.hpp (renamed from compat/powerset.hpp) | 9 | ||||
-rw-r--r-- | qxt-mini/qxtglobalshortcut_x11.cpp | 2 |
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> |