@@ -100,15 +100,22 @@ class PointerBuffer : public ObjectWrap<PointerBuffer> {
100100};
101101
102102Object PointerBuffer::Init (Napi::Env env, Object exports) {
103- Function func =
104- DefineClass (env, " PointerBuffer" ,
105- {InstanceMethod (" isNull" , &PointerBuffer::IsNull),
106- InstanceMethod (" get" , &PointerBuffer::Get),
107- InstanceMethod (" address" , &PointerBuffer::Address),
108- InstanceMethod (" toString" , &PointerBuffer::ToString),
109- InstanceMethod (" copy" , &PointerBuffer::Copy),
110- InstanceMethod (" slice" , &PointerBuffer::Slice),
111- InstanceAccessor<&PointerBuffer::Length>(" length" )});
103+ Function func = DefineClass (
104+ env, " PointerBuffer" ,
105+ {InstanceMethod (" isNull" , &PointerBuffer::IsNull),
106+ InstanceMethod (" get" , &PointerBuffer::Get),
107+ InstanceMethod (" address" , &PointerBuffer::Address),
108+ InstanceMethod (" toString" , &PointerBuffer::ToString),
109+ InstanceMethod (" copy" , &PointerBuffer::Copy),
110+ InstanceMethod (" slice" , &PointerBuffer::Slice),
111+ // Use the runtime InstanceAccessor(name, getter, setter)
112+ // overload rather than the templated
113+ // InstanceAccessor<&Fn>() form: the latter's constexpr
114+ // member-pointer template argument triggers an MSVC
115+ // Internal Compiler Error (C1001) on the VS 2026 (v18)
116+ // toolset used by the windows-2025 CI runner. This form
117+ // is equivalent and compiles cleanly on every platform.
118+ InstanceAccessor (" length" , &PointerBuffer::Length, nullptr )});
112119
113120 exports.Set (" PointerBuffer" , func);
114121 InstanceData* data = InstanceData::Get (env);
0 commit comments