File indexing completed on 2026-05-03 08:13:25
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef _LIBCPP___CXX03___CHRONO_STATICALLY_WIDEN_H
0011 #define _LIBCPP___CXX03___CHRONO_STATICALLY_WIDEN_H
0012
0013
0014
0015 #include <__cxx03/__concepts/same_as.h>
0016 #include <__cxx03/__config>
0017 #include <__cxx03/__format/concepts.h>
0018
0019 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
0020 # pragma GCC system_header
0021 #endif
0022
0023 _LIBCPP_BEGIN_NAMESPACE_STD
0024
0025 #if _LIBCPP_STD_VER >= 20
0026
0027 # ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
0028 template <__fmt_char_type _CharT>
0029 _LIBCPP_HIDE_FROM_ABI constexpr const _CharT* __statically_widen(const char* __str, const wchar_t* __wstr) {
0030 if constexpr (same_as<_CharT, char>)
0031 return __str;
0032 else
0033 return __wstr;
0034 }
0035 # define _LIBCPP_STATICALLY_WIDEN(_CharT, __str) ::std::__statically_widen<_CharT>(__str, L##__str)
0036 # else
0037
0038
0039
0040
0041 template <__fmt_char_type _CharT>
0042 _LIBCPP_HIDE_FROM_ABI constexpr const _CharT* __statically_widen(const char* __str) {
0043 return __str;
0044 }
0045 # define _LIBCPP_STATICALLY_WIDEN(_CharT, __str) ::std::__statically_widen<_CharT>(__str)
0046 # endif
0047
0048 #endif
0049
0050 _LIBCPP_END_NAMESPACE_STD
0051
0052 #endif