File indexing completed on 2026-05-03 08:13:25
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef _LIBCPP___CXX03___CHRONO_TIME_ZONE_LINK_H
0013 #define _LIBCPP___CXX03___CHRONO_TIME_ZONE_LINK_H
0014
0015 #include <__cxx03/version>
0016
0017 #if !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB)
0018
0019 # include <__cxx03/__compare/strong_order.h>
0020 # include <__cxx03/__config>
0021 # include <__cxx03/__utility/private_constructor_tag.h>
0022 # include <__cxx03/string>
0023 # include <__cxx03/string_view>
0024
0025 # if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
0026 # pragma GCC system_header
0027 # endif
0028
0029 _LIBCPP_PUSH_MACROS
0030 # include <__cxx03/__undef_macros>
0031
0032 _LIBCPP_BEGIN_NAMESPACE_STD
0033
0034 # if _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM) && \
0035 !defined(_LIBCPP_HAS_NO_LOCALIZATION)
0036
0037 namespace chrono {
0038
0039 class time_zone_link {
0040 public:
0041 [[nodiscard]]
0042 _LIBCPP_HIDE_FROM_ABI explicit time_zone_link(__private_constructor_tag, string_view __name, string_view __target)
0043 : __name_{__name}, __target_{__target} {}
0044
0045 _LIBCPP_HIDE_FROM_ABI time_zone_link(time_zone_link&&) = default;
0046 _LIBCPP_HIDE_FROM_ABI time_zone_link& operator=(time_zone_link&&) = default;
0047
0048 [[nodiscard]] _LIBCPP_HIDE_FROM_ABI string_view name() const noexcept { return __name_; }
0049 [[nodiscard]] _LIBCPP_HIDE_FROM_ABI string_view target() const noexcept { return __target_; }
0050
0051 private:
0052 string __name_;
0053
0054
0055
0056 string __target_;
0057 };
0058
0059 [[nodiscard]] _LIBCPP_AVAILABILITY_TZDB _LIBCPP_HIDE_FROM_ABI inline bool
0060 operator==(const time_zone_link& __x, const time_zone_link& __y) noexcept {
0061 return __x.name() == __y.name();
0062 }
0063
0064 [[nodiscard]] _LIBCPP_AVAILABILITY_TZDB _LIBCPP_HIDE_FROM_ABI inline strong_ordering
0065 operator<=>(const time_zone_link& __x, const time_zone_link& __y) noexcept {
0066 return __x.name() <=> __y.name();
0067 }
0068
0069 }
0070
0071 # endif
0072
0073 _LIBCPP_END_NAMESPACE_STD
0074
0075 _LIBCPP_POP_MACROS
0076
0077 #endif
0078
0079 #endif