MSVC isn't capable of building a simple module and including glaze json library header
The error given is simply C1001 Internal compiler error. This problem has been here for a really long time, like I discovered it about months ago. I am on version Visual Studio 2026, version 18.1.1.
Here is a reproducible example.
It simply looks like this:
//main.cpp
import serialisation_module; // error still occurs if you don't import (comment this out)
#include // doesn't make a difference if this is here or not.
int main()
{
}
And:
//serialisation_module.cppm
module;
#include "glaze/glaze.hpp"
export module serialisation_module;
template
void read_json(T& obj_out)
{
char buff[1024];
static constexpr glz::opts options{ .error_on_unknown_keys = false };
glz::error_ctx ret_val2 = glz::read(obj_out, std::string_view(buff, 1024));
}
Can someone please report this bug to Microsoft, I don't have an account.