xref: /freebsd/contrib/llvm-project/libcxx/include/__chrono/local_info.h (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
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 
10 // For information see https://libcxx.llvm.org/DesignDocs/TimeZone.html
11 
12 #ifndef _LIBCPP___CHRONO_LOCAL_INFO_H
13 #define _LIBCPP___CHRONO_LOCAL_INFO_H
14 
15 #include <version>
16 // Enable the contents of the header only when libc++ was built with experimental features enabled.
17 #if !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB)
18 
19 #  include <__chrono/sys_info.h>
20 #  include <__config>
21 
22 #  if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
23 #    pragma GCC system_header
24 #  endif
25 
26 _LIBCPP_BEGIN_NAMESPACE_STD
27 
28 #  if _LIBCPP_STD_VER >= 20
29 
30 namespace chrono {
31 
32 struct local_info {
33   static constexpr int unique      = 0;
34   static constexpr int nonexistent = 1;
35   static constexpr int ambiguous   = 2;
36 
37   int result;
38   sys_info first;
39   sys_info second;
40 };
41 
42 } // namespace chrono
43 
44 #  endif // _LIBCPP_STD_VER >= 20
45 
46 _LIBCPP_END_NAMESPACE_STD
47 
48 #endif // !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB)
49 
50 #endif // _LIBCPP___CHRONO_LOCAL_INFO_H
51