From 051ec971861f883b4317a7c6c98d2408564bfa32 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Mon, 23 Jul 2018 09:04:27 +0200 Subject: [PATCH] Give a nice error message on Kaleidoscope.use() when compiling with V2 API only In preparation for the sunset of the V1 API, when using the V2 API only, give a nice error message on `Kaleidoscope.use()`, instead of simply not defining it. This makes the upgrade path a little easier. Signed-off-by: Gergely Nagy --- src/Kaleidoscope.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Kaleidoscope.h b/src/Kaleidoscope.h index b5500c81..2d29272c 100644 --- a/src/Kaleidoscope.h +++ b/src/Kaleidoscope.h @@ -140,6 +140,11 @@ class Kaleidoscope_ { use(plugins...); #pragma GCC diagnostic pop } +#else + // NOTE: Do **NOT** remove this when sunsetting the V1 API! + inline void use(...) { + static_assert(false, _DEPRECATE(_DEPRECATED_MESSAGE_USE)); + } #endif // ---- hooks ----