From e7355a2fc2e42cd7405bf74a37f98d0222f61126 Mon Sep 17 00:00:00 2001 From: ShepherdSoasis Date: Wed, 9 Nov 2022 18:22:56 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=A0=20Fix=20exhaustive=20checking=20co?= =?UTF-8?q?mpilation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/source/docs/std_thread.cpp | 2 +- include/sol/stack_check_unqualified.hpp | 2 +- include/sol/types.hpp | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/source/docs/std_thread.cpp b/examples/source/docs/std_thread.cpp index 3c15f80b..6b8a30c2 100644 --- a/examples/source/docs/std_thread.cpp +++ b/examples/source/docs/std_thread.cpp @@ -23,7 +23,7 @@ struct worker_data { }; void worker_thread(worker_data& data) { - for (std::uint64_t loops = 0; true; ++loops) { + for ([[maybe_unused]] std::uint64_t loops = 0; true; ++loops) { // Wait until main() sends data std::unique_lock data_lock( data.until_ready_mutex); diff --git a/include/sol/stack_check_unqualified.hpp b/include/sol/stack_check_unqualified.hpp index f0aaa011..37c220bb 100644 --- a/include/sol/stack_check_unqualified.hpp +++ b/include/sol/stack_check_unqualified.hpp @@ -582,7 +582,7 @@ namespace sol { namespace stack { template struct unqualified_checker, expect> { template - static bool check_two(types, lua_State* arg_L, int index, type indextype, Handler&& handler, record& tracking) { + static bool check_two(types, lua_State* arg_L, int relindex, type indextype, Handler&& handler, record& tracking) { tracking.use(1); #if SOL_IS_ON(SOL_SAFE_STACK_CHECK) diff --git a/include/sol/types.hpp b/include/sol/types.hpp index 9fd300ec..204516a2 100644 --- a/include/sol/types.hpp +++ b/include/sol/types.hpp @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #if SOL_IS_ON(SOL_STD_VARIANT) @@ -494,7 +495,7 @@ namespace sol { }; template - using exhaustive = exhaustive_until::max()>; + using exhaustive = exhaustive_until::max)()>; template struct non_exhaustive : private detail::ebco {