null.h 790 B

1234567891011121314151617181920212223242526
  1. #ifndef NULL_H_62B23520_7C8E_11DE_8A39_0800200C9A66
  2. #define NULL_H_62B23520_7C8E_11DE_8A39_0800200C9A66
  3. #if defined(_MSC_VER) || \
  4. (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
  5. (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
  6. #pragma once
  7. #endif
  8. #include "yaml-cpp/dll.h"
  9. #include <string>
  10. namespace YAML {
  11. class Node;
  12. struct YAML_CPP_API _Null {};
  13. inline bool operator==(const _Null&, const _Null&) { return true; }
  14. inline bool operator!=(const _Null&, const _Null&) { return false; }
  15. YAML_CPP_API bool IsNull(const Node& node); // old API only
  16. YAML_CPP_API bool IsNullString(const std::string& str);
  17. extern YAML_CPP_API _Null Null;
  18. }
  19. #endif // NULL_H_62B23520_7C8E_11DE_8A39_0800200C9A66