Skip to content

Commit

Permalink
MSVC fix
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenberry committed Oct 26, 2022
1 parent c71d061 commit 5cd684b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/glaze/json/write.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,9 @@ namespace glz
else {
write<json>::op<Opts>(std::get<I>(value), std::forward<Args>(args)...);
}
if constexpr (I < N - 1) {
// MSVC bug if this logic is in the constexpr
constexpr bool needs_comma = I < N - 1;
if constexpr (needs_comma) {
dump<','>(std::forward<Args>(args)...);
}
});
Expand Down

0 comments on commit 5cd684b

Please sign in to comment.