Skip to content

Commit

Permalink
reflect: fix uint16 compile error in find_unique_sized_index
Browse files Browse the repository at this point in the history
the left-shift operator causes integer promotion which results in compiler errors on at least msvc
  • Loading branch information
timsjostrand committed Jan 24, 2025
1 parent 5980f9a commit ebe721a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/glaze/core/reflect.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ namespace glz::detail
const auto& s = strings[i];
// for each character in the string
for (size_t c = 0; c < min_length; ++c) {
const auto k = uint16_t(s[c]) | (uint16_t(s.size()) << 8);
const auto k = uint16_t(uint16_t(s[c]) | (uint16_t(s.size()) << 8));
cols[c].emplace_back(k);
}
}
Expand Down

0 comments on commit ebe721a

Please sign in to comment.