Skip to content

Commit

Permalink
Added issue link for MSVC bug
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenberry committed Oct 26, 2022
1 parent 5cd684b commit 6004d00
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/glaze/json/write.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,8 @@ namespace glz
else {
write<json>::op<Opts>(std::get<I>(value), std::forward<Args>(args)...);
}
// MSVC bug if this logic is in the constexpr
// MSVC bug if this logic is in the `if constexpr`
// https://developercommunity.visualstudio.com/t/stdc20-fatal-error-c1004-unexpected-end-of-file-fo/1509806
constexpr bool needs_comma = I < N - 1;
if constexpr (needs_comma) {
dump<','>(std::forward<Args>(args)...);
Expand Down

0 comments on commit 6004d00

Please sign in to comment.