Unicode.h 549 B

12345678910111213141516171819
  1. #if !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)
  2. #pragma once
  3. #if defined(_WIN32)
  4. #include <c10/util/Exception.h>
  5. #include <c10/util/win32-headers.h>
  6. #include <string>
  7. #endif
  8. namespace c10 {
  9. #if defined(_WIN32)
  10. C10_API std::wstring u8u16(const std::string& str);
  11. C10_API std::string u16u8(const std::wstring& wstr);
  12. #endif
  13. } // namespace c10
  14. #else
  15. #error "This file should not be included when either TORCH_STABLE_ONLY or TORCH_TARGET_VERSION is defined."
  16. #endif // !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)