mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
🛠 Fix exhaustive checking compilation
This commit is contained in:
parent
3592851a2a
commit
f81643aa0c
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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> {
|
||||
|
|
Loading…
Reference in New Issue
Block a user