xref: /freebsd-src/contrib/llvm-project/libcxx/include/__chrono/local_info.h (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
1*0fca6ea1SDimitry Andric // -*- C++ -*-
2*0fca6ea1SDimitry Andric //===----------------------------------------------------------------------===//
3*0fca6ea1SDimitry Andric //
4*0fca6ea1SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5*0fca6ea1SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
6*0fca6ea1SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7*0fca6ea1SDimitry Andric //
8*0fca6ea1SDimitry Andric //===----------------------------------------------------------------------===//
9*0fca6ea1SDimitry Andric 
10*0fca6ea1SDimitry Andric // For information see https://libcxx.llvm.org/DesignDocs/TimeZone.html
11*0fca6ea1SDimitry Andric 
12*0fca6ea1SDimitry Andric #ifndef _LIBCPP___CHRONO_LOCAL_INFO_H
13*0fca6ea1SDimitry Andric #define _LIBCPP___CHRONO_LOCAL_INFO_H
14*0fca6ea1SDimitry Andric 
15*0fca6ea1SDimitry Andric #include <version>
16*0fca6ea1SDimitry Andric // Enable the contents of the header only when libc++ was built with experimental features enabled.
17*0fca6ea1SDimitry Andric #if !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB)
18*0fca6ea1SDimitry Andric 
19*0fca6ea1SDimitry Andric #  include <__chrono/sys_info.h>
20*0fca6ea1SDimitry Andric #  include <__config>
21*0fca6ea1SDimitry Andric 
22*0fca6ea1SDimitry Andric #  if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
23*0fca6ea1SDimitry Andric #    pragma GCC system_header
24*0fca6ea1SDimitry Andric #  endif
25*0fca6ea1SDimitry Andric 
26*0fca6ea1SDimitry Andric _LIBCPP_BEGIN_NAMESPACE_STD
27*0fca6ea1SDimitry Andric 
28*0fca6ea1SDimitry Andric #  if _LIBCPP_STD_VER >= 20
29*0fca6ea1SDimitry Andric 
30*0fca6ea1SDimitry Andric namespace chrono {
31*0fca6ea1SDimitry Andric 
32*0fca6ea1SDimitry Andric struct local_info {
33*0fca6ea1SDimitry Andric   static constexpr int unique      = 0;
34*0fca6ea1SDimitry Andric   static constexpr int nonexistent = 1;
35*0fca6ea1SDimitry Andric   static constexpr int ambiguous   = 2;
36*0fca6ea1SDimitry Andric 
37*0fca6ea1SDimitry Andric   int result;
38*0fca6ea1SDimitry Andric   sys_info first;
39*0fca6ea1SDimitry Andric   sys_info second;
40*0fca6ea1SDimitry Andric };
41*0fca6ea1SDimitry Andric 
42*0fca6ea1SDimitry Andric } // namespace chrono
43*0fca6ea1SDimitry Andric 
44*0fca6ea1SDimitry Andric #  endif // _LIBCPP_STD_VER >= 20
45*0fca6ea1SDimitry Andric 
46*0fca6ea1SDimitry Andric _LIBCPP_END_NAMESPACE_STD
47*0fca6ea1SDimitry Andric 
48*0fca6ea1SDimitry Andric #endif // !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB)
49*0fca6ea1SDimitry Andric 
50*0fca6ea1SDimitry Andric #endif // _LIBCPP___CHRONO_LOCAL_INFO_H
51