diff --git a/cpp/playground_headers.single.hpp b/cpp/playground_headers.single.hpp index 20b557b6..2c3fb8d3 100644 --- a/cpp/playground_headers.single.hpp +++ b/cpp/playground_headers.single.hpp @@ -4186,10 +4186,14 @@ constexpr std::size_t swar_find_difference(swar_int lhs, swar_int rhs) #if defined(__GNUC__) auto bit_idx = __builtin_ctzll(mask); -#elif defined(_MSC_VER) +#elif defined(_MSC_VER) && defined(_WIN64) unsigned long bit_idx; - if (!_BitScanForward64(&bit_idx, mask)) - bit_idx = 64; + _BitScanForward64(&bit_idx, mask); +#elif defined(_MSC_VER) + unsigned long bit_idx = 0; + if (!_BitScanForward(&bit_idx, static_cast(mask)) + && _BitScanForward(&bit_idx, mask >> 32)) + bit_idx += 32; #else # error "unsupported compiler; please file an issue" #endif @@ -5324,18 +5328,12 @@ struct pt_node_token : pt_node { if constexpr (_optimize_end) { - static_assert(!std::is_pointer_v - || sizeof(pt_node_token) == 3 * sizeof(void*)); - auto size = std::size_t(end - begin); LEXY_PRECONDITION(size <= UINT_LEAST32_MAX); end_impl = std::uint_least32_t(size); } else { - static_assert(!std::is_pointer_v - || sizeof(pt_node_token) <= 4 * sizeof(void*)); - end_impl = end; } } @@ -5355,7 +5353,6 @@ struct pt_node_production : pt_node : pt_node(pt_node::type_production), id(info.id), child_count(0), token_production(info.is_token), first_child_adjacent(true) { - static_assert(sizeof(pt_node_production) == 3 * sizeof(void*)); LEXY_PRECONDITION(!info.is_transparent); } diff --git a/download/lexy-src.zip b/download/lexy-src.zip index 6abdd374..cae1e0a0 100644 Binary files a/download/lexy-src.zip and b/download/lexy-src.zip differ