🛠 Fix exhaustive checking compilation

This commit is contained in:
ShepherdSoasis 2022-11-09 18:22:56 -05:00
parent eb0e29f567
commit e7355a2fc2
No known key found for this signature in database
GPG Key ID: C92B2293E783EFEF
3 changed files with 4 additions and 3 deletions

View File

@ -23,7 +23,7 @@ struct worker_data {
}; };
void worker_thread(worker_data& 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 // Wait until main() sends data
std::unique_lock<std::mutex> data_lock( std::unique_lock<std::mutex> data_lock(
data.until_ready_mutex); data.until_ready_mutex);

View File

@ -582,7 +582,7 @@ namespace sol { namespace stack {
template <typename T, std::size_t N, type expect> template <typename T, std::size_t N, type expect>
struct unqualified_checker<exhaustive_until<T, N>, expect> { struct unqualified_checker<exhaustive_until<T, N>, expect> {
template <typename K, typename V, typename Handler> 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); tracking.use(1);
#if SOL_IS_ON(SOL_SAFE_STACK_CHECK) #if SOL_IS_ON(SOL_SAFE_STACK_CHECK)

View File

@ -39,6 +39,7 @@
#include <initializer_list> #include <initializer_list>
#include <string> #include <string>
#include <string_view> #include <string_view>
#include <limits>
#include <optional> #include <optional>
#include <memory> #include <memory>
#if SOL_IS_ON(SOL_STD_VARIANT) #if SOL_IS_ON(SOL_STD_VARIANT)
@ -494,7 +495,7 @@ namespace sol {
}; };
template <typename T> 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> template <typename T>
struct non_exhaustive : private detail::ebco<T> { struct non_exhaustive : private detail::ebco<T> {