🛠 Fix exhaustive checking compilation

This commit is contained in:
ShepherdSoasis 2022-11-09 18:22:56 -05:00 committed by The Phantom Derpstorm
parent 3592851a2a
commit f81643aa0c
3 changed files with 4 additions and 3 deletions

View File

@ -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<std::mutex> data_lock(
data.until_ready_mutex);

View File

@ -582,7 +582,7 @@ namespace sol { namespace stack {
template <typename T, std::size_t N, type expect>
struct unqualified_checker<exhaustive_until<T, N>, expect> {
template <typename K, typename V, typename Handler>
static bool check_two(types<K, V>, lua_State* arg_L, int index, type indextype, Handler&& handler, record& tracking) {
static bool check_two(types<K, V>, lua_State* arg_L, int relindex, type indextype, Handler&& handler, record& tracking) {
tracking.use(1);
#if SOL_IS_ON(SOL_SAFE_STACK_CHECK)

View File

@ -39,6 +39,7 @@
#include <initializer_list>
#include <string>
#include <string_view>
#include <limits>
#include <optional>
#include <memory>
#if SOL_IS_ON(SOL_STD_VARIANT)
@ -494,7 +495,7 @@ namespace sol {
};
template <typename T>
using exhaustive = exhaustive_until<T, std::numeric_limits<size_t>::max()>;
using exhaustive = exhaustive_until<T, (std::numeric_limits<size_t>::max)()>;
template <typename T>
struct non_exhaustive : private detail::ebco<T> {