xref: /aosp_15_r20/external/cronet/third_party/libc++/src/src/time_zone.cpp (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 // For information see https://libcxx.llvm.org/DesignDocs/TimeZone.html
10 
11 #include <chrono>
12 
13 #include "include/tzdb/time_zone_private.h"
14 
15 _LIBCPP_BEGIN_NAMESPACE_STD
16 
17 namespace chrono {
18 
__create(unique_ptr<time_zone::__impl> && __p)19 [[nodiscard]] _LIBCPP_EXPORTED_FROM_ABI time_zone time_zone::__create(unique_ptr<time_zone::__impl>&& __p) {
20   _LIBCPP_ASSERT_NON_NULL(__p != nullptr, "initialized time_zone without a valid pimpl object");
21   time_zone result;
22   result.__impl_ = std::move(__p);
23   return result;
24 }
25 
26 _LIBCPP_EXPORTED_FROM_ABI time_zone::~time_zone() = default;
27 
__name() const28 [[nodiscard]] _LIBCPP_EXPORTED_FROM_ABI string_view time_zone::__name() const noexcept { return __impl_->__name(); }
29 
30 } // namespace chrono
31 
32 _LIBCPP_END_NAMESPACE_STD
33