Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-03 08:13:24

0001 // -*- C++ -*-
0002 //===----------------------------------------------------------------------===//
0003 //
0004 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0005 // See https://llvm.org/LICENSE.txt for license information.
0006 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0007 //
0008 //===----------------------------------------------------------------------===//
0009 
0010 #ifndef _LIBCPP___CXX03___CHRONO_LITERALS_H
0011 #define _LIBCPP___CXX03___CHRONO_LITERALS_H
0012 
0013 #include <__cxx03/__chrono/day.h>
0014 #include <__cxx03/__chrono/year.h>
0015 #include <__cxx03/__config>
0016 
0017 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
0018 #  pragma GCC system_header
0019 #endif
0020 
0021 #if _LIBCPP_STD_VER >= 20
0022 
0023 _LIBCPP_BEGIN_NAMESPACE_STD
0024 
0025 inline namespace literals {
0026 inline namespace chrono_literals {
0027 _LIBCPP_HIDE_FROM_ABI constexpr chrono::day operator""d(unsigned long long __d) noexcept {
0028   return chrono::day(static_cast<unsigned>(__d));
0029 }
0030 
0031 _LIBCPP_HIDE_FROM_ABI constexpr chrono::year operator""y(unsigned long long __y) noexcept {
0032   return chrono::year(static_cast<int>(__y));
0033 }
0034 } // namespace chrono_literals
0035 } // namespace literals
0036 
0037 namespace chrono { // hoist the literals into namespace std::chrono
0038 using namespace literals::chrono_literals;
0039 } // namespace chrono
0040 
0041 _LIBCPP_END_NAMESPACE_STD
0042 
0043 #endif // _LIBCPP_STD_VER >= 20
0044 
0045 #endif // _LIBCPP___CXX03___CHRONO_LITERALS_H