Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
621 B

  1. // MinMax.h
  2. #if !defined(VSEE_LIB_MINMAX_H_INCLUDED_) // {
  3. #define VSEE_LIB_MINMAX_H_INCLUDED_
  4. // If you include this early enough, you'll get
  5. // template <class T> std::min(T, T);
  6. // template <class T> std::max(T, T);
  7. // instead of any variation like
  8. // std::_cpp_min or #define min ...
  9. #pragma once
  10. // defeat non std:: definitions of min and max
  11. #define _INC_MINMAX
  12. #define NOMINMAX
  13. /* these two "identity #defines" prevent straightforward
  14. future #defines, like, without deliberately #undefing them.
  15. */
  16. #define min min
  17. #define max max
  18. #define _cpp_min min
  19. #define _cpp_max max
  20. #endif // }