Temporary fix for #105

This commit is contained in:
Shane Grant 2014-08-18 23:15:29 -07:00
parent ba63d4a093
commit 9a5a7134db
2 changed files with 7 additions and 0 deletions

View File

@ -623,6 +623,7 @@ namespace cereal
loadLong(T & lu){ loadValue( reinterpret_cast<std::uint64_t&>( lu ) ); }
public:
#ifndef _MSC_VER
//! Serialize a long if it would not be caught otherwise
template <class T> inline
typename std::enable_if<std::is_same<T, long>::value &&
@ -636,6 +637,7 @@ namespace cereal
!std::is_same<T, std::uint32_t>::value &&
!std::is_same<T, std::uint64_t>::value, void>::type
loadValue( T & t ){ loadLong(t); }
#endif // _MSC_VER
private:
//! Convert a string to a long long

View File

@ -228,5 +228,10 @@ int main()
std::cout << cereal::traits::has_member_save_minimal<MemberMinimal, Archive>::value << std::endl;
std::cout << cereal::traits::has_member_load_minimal<MemberMinimal, Archive>::value << std::endl;
cereal::JSONInputArchive bla(std::cin);
long l;
bla.loadValue(l);
return 0;
}