diff --git a/src/Kaleidoscope/MagicCombo.h b/src/Kaleidoscope/MagicCombo.h index 22184ba7..38e669a2 100644 --- a/src/Kaleidoscope/MagicCombo.h +++ b/src/Kaleidoscope/MagicCombo.h @@ -31,6 +31,13 @@ } \ } +#define _MAGICCOMBO_API_CHANGE \ + "The MagicCombo API changed in an incompatible way, you will need to\n" \ + "upgrade.\n" \ + "\n" \ + "Please see the `UPGRADING.md` document shipped with the source:\n" \ + " https://github.com/keyboardio/Kaleidoscope-MagicCombo/blob/master/UPGRADING.md" + namespace kaleidoscope { class MagicCombo : public kaleidoscope::Plugin { @@ -43,8 +50,15 @@ class MagicCombo : public kaleidoscope::Plugin { typedef struct combo_t { uint32_t left_hand, right_hand; - private: - combo_t(byte left, byte right) {} + template + struct always_false { + enum { value = false }; + }; + + template + combo_t(T l, T r) { + static_assert(always_false::value, _DEPRECATE(_MAGICCOMBO_API_CHANGE)); + } } combo_t; MagicCombo(void) {}