Skip to content

Commit

Permalink
deploy: 21728ab
Browse files Browse the repository at this point in the history
  • Loading branch information
foonathan committed Jan 7, 2025
1 parent c6d87e1 commit 9eff7df
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions cpp/playground_headers.single.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::uint32_t>(mask))
&& _BitScanForward(&bit_idx, mask >> 32))
bit_idx += 32;
#else
# error "unsupported compiler; please file an issue"
#endif
Expand Down Expand Up @@ -5324,18 +5328,12 @@ struct pt_node_token : pt_node<Reader>
{
if constexpr (_optimize_end)
{
static_assert(!std::is_pointer_v<typename Reader::iterator>
|| 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<typename Reader::iterator>
|| sizeof(pt_node_token) <= 4 * sizeof(void*));

end_impl = end;
}
}
Expand All @@ -5355,7 +5353,6 @@ struct pt_node_production : pt_node<Reader>
: pt_node<Reader>(pt_node<Reader>::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);
}

Expand Down
Binary file modified download/lexy-src.zip
Binary file not shown.

0 comments on commit 9eff7df

Please sign in to comment.