File indexing completed on 2026-05-03 08:13:23
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef _LIBCPP___CXX03___CHARCONV_CHARS_FORMAT_H
0011 #define _LIBCPP___CXX03___CHARCONV_CHARS_FORMAT_H
0012
0013 #include <__cxx03/__config>
0014 #include <__cxx03/__utility/to_underlying.h>
0015
0016 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
0017 # pragma GCC system_header
0018 #endif
0019
0020 _LIBCPP_BEGIN_NAMESPACE_STD
0021
0022 #if _LIBCPP_STD_VER >= 17
0023
0024 enum class chars_format { scientific = 0x1, fixed = 0x2, hex = 0x4, general = fixed | scientific };
0025
0026 inline _LIBCPP_HIDE_FROM_ABI constexpr chars_format operator~(chars_format __x) {
0027 return chars_format(~std::__to_underlying(__x));
0028 }
0029
0030 inline _LIBCPP_HIDE_FROM_ABI constexpr chars_format operator&(chars_format __x, chars_format __y) {
0031 return chars_format(std::__to_underlying(__x) & std::__to_underlying(__y));
0032 }
0033
0034 inline _LIBCPP_HIDE_FROM_ABI constexpr chars_format operator|(chars_format __x, chars_format __y) {
0035 return chars_format(std::__to_underlying(__x) | std::__to_underlying(__y));
0036 }
0037
0038 inline _LIBCPP_HIDE_FROM_ABI constexpr chars_format operator^(chars_format __x, chars_format __y) {
0039 return chars_format(std::__to_underlying(__x) ^ std::__to_underlying(__y));
0040 }
0041
0042 inline _LIBCPP_HIDE_FROM_ABI constexpr chars_format& operator&=(chars_format& __x, chars_format __y) {
0043 __x = __x & __y;
0044 return __x;
0045 }
0046
0047 inline _LIBCPP_HIDE_FROM_ABI constexpr chars_format& operator|=(chars_format& __x, chars_format __y) {
0048 __x = __x | __y;
0049 return __x;
0050 }
0051
0052 inline _LIBCPP_HIDE_FROM_ABI constexpr chars_format& operator^=(chars_format& __x, chars_format __y) {
0053 __x = __x ^ __y;
0054 return __x;
0055 }
0056
0057 #endif
0058
0059 _LIBCPP_END_NAMESPACE_STD
0060
0061 #endif