IntTypes.cpp 631 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #include "IntTypes.hpp"
  2. #pragma warning(disable:4710)
  3. #pragma warning(push,3)
  4. #include <iostream>
  5. #pragma warning(pop)
  6. using std::ostream;
  7. ostream& operator<<(ostream& os, IntTypes::int64_t i)
  8. {
  9. char buf[65];
  10. _i64toa(i, buf, 10);
  11. return os << buf;
  12. }
  13. ostream& operator<<(ostream& os, IntTypes::uint64_t i)
  14. {
  15. char buf[65];
  16. _ui64toa(i, buf, 10);
  17. return os << buf;
  18. }
  19. ostream& operator<<(ostream& os, IntTypes::uint32_t i)
  20. {
  21. return os << static_cast<unsigned int>(i);
  22. }
  23. ostream& operator<<(ostream& os, IntTypes::uint16_t i)
  24. {
  25. char buf[33];
  26. _ultoa(i, buf, 10);
  27. return os << buf;
  28. }