@@ -451,6 +451,26 @@ struct TypeHelper<ValueType, unsigned> {
451
451
static ValueType& Set (ValueType& v, unsigned data, typename ValueType::AllocatorType&) { return v.SetUint (data); }
452
452
};
453
453
454
+ #ifdef _MSC_VER
455
+ RAPIDJSON_STATIC_ASSERT (sizeof (long ) == sizeof(int ));
456
+ template <typename ValueType>
457
+ struct TypeHelper <ValueType, long > {
458
+ static bool Is (const ValueType& v) { return v.IsInt (); }
459
+ static long Get (const ValueType& v) { return v.GetInt (); }
460
+ static ValueType& Set (ValueType& v, long data) { return v.SetInt (data); }
461
+ static ValueType& Set (ValueType& v, long data, typename ValueType::AllocatorType&) { return v.SetInt (data); }
462
+ };
463
+
464
+ RAPIDJSON_STATIC_ASSERT (sizeof (unsigned long ) == sizeof(unsigned ));
465
+ template <typename ValueType>
466
+ struct TypeHelper <ValueType, unsigned long > {
467
+ static bool Is (const ValueType& v) { return v.IsUint (); }
468
+ static unsigned long Get (const ValueType& v) { return v.GetUint (); }
469
+ static ValueType& Set (ValueType& v, unsigned long data) { return v.SetUint (data); }
470
+ static ValueType& Set (ValueType& v, unsigned long data, typename ValueType::AllocatorType&) { return v.SetUint (data); }
471
+ };
472
+ #endif
473
+
454
474
template <typename ValueType>
455
475
struct TypeHelper <ValueType, int64_t > {
456
476
static bool Is (const ValueType& v) { return v.IsInt64 (); }
0 commit comments