tzdb.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // -*- C++ -*-
  2. //===----------------------------------------------------------------------===//
  3. //
  4. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  5. // See https://llvm.org/LICENSE.txt for license information.
  6. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  7. //
  8. //===----------------------------------------------------------------------===//
  9. // For information see https://libcxx.llvm.org/DesignDocs/TimeZone.html
  10. #ifndef _LIBCPP___CHRONO_TZDB_H
  11. #define _LIBCPP___CHRONO_TZDB_H
  12. #include <version>
  13. // Enable the contents of the header only when libc++ was built with experimental features enabled.
  14. #if !defined(_LIBCPP_HAS_NO_INCOMPLETE_TZDB)
  15. # include <string>
  16. # if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  17. # pragma GCC system_header
  18. # endif
  19. _LIBCPP_BEGIN_NAMESPACE_STD
  20. # if _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM) && \
  21. !defined(_LIBCPP_HAS_NO_LOCALIZATION)
  22. namespace chrono {
  23. struct _LIBCPP_AVAILABILITY_TZDB tzdb {
  24. string version;
  25. };
  26. } // namespace chrono
  27. # endif // _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
  28. // && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
  29. _LIBCPP_END_NAMESPACE_STD
  30. #endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_TZDB)
  31. #endif // _LIBCPP___CHRONO_TZDB_H