Comment #12 on issue 83 by [email protected]: protobuf does not compile cleanly in 64-bit mode in Visual Studio 2008
http://code.google.com/p/protobuf/issues/detail?id=83

Yikes, adding #pragmas all over like that is pretty ugly.

What is the proper way to prevent these warnings in MSVC, without disabling them? Explicit casts? I'd much rather do that than add pragmas everywhere. Better yet,
maybe we could define a new cast:

template <typename To, typename From>
To truncating_cast(From value) {
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4244)
#endif
  return value;
#ifdef _MSC_VER
#pragma warning(pop)
#endif
}

Then use that everywhere...

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to