Specialize std::numeric_limits<> for wxLongLong and wxULongLong.

numeric_limits<> should be specialized for number-like types to allow using
them in a similar way to the built-in types.

Closes #13162.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67610 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-04-26 22:56:50 +00:00
parent e3e89e6260
commit 3dd4d0ec9e
2 changed files with 38 additions and 0 deletions

View File

@@ -1075,6 +1075,31 @@ WXDLLIMPEXP_BASE class wxTextInputStream &operator>>(class wxTextInputStream &st
#endif
// ----------------------------------------------------------------------------
// Specialize numeric_limits<> for our long long wrapper classes.
// ----------------------------------------------------------------------------
#if wxUSE_LONGLONG_NATIVE
#include <limits>
namespace std
{
template<> class numeric_limits<wxLongLong>
: public numeric_limits<wxLongLong_t>
{
};
template<> class numeric_limits<wxULongLong>
: public numeric_limits<wxULongLong_t>
{
};
} // namespace std
#endif // wxUSE_LONGLONG_NATIVE
#endif // wxUSE_LONGLONG
#endif // _WX_LONGLONG_H