File indexing completed on 2025-04-19 08:19:40
0001
0002
0003
0004
0005 #ifndef BOOST_CHARCONV_DETAIL_TO_CHARS_RESULT_HPP
0006 #define BOOST_CHARCONV_DETAIL_TO_CHARS_RESULT_HPP
0007
0008 #include <system_error>
0009
0010
0011
0012 namespace boost { namespace charconv {
0013
0014 struct to_chars_result
0015 {
0016 char *ptr;
0017 std::errc ec;
0018
0019 constexpr friend bool operator==(const to_chars_result &lhs, const to_chars_result &rhs) noexcept
0020 {
0021 return lhs.ptr == rhs.ptr && lhs.ec == rhs.ec;
0022 }
0023
0024 constexpr friend bool operator!=(const to_chars_result &lhs, const to_chars_result &rhs) noexcept
0025 {
0026 return !(lhs == rhs);
0027 }
0028
0029 constexpr explicit operator bool() const noexcept { return ec == std::errc{}; }
0030 };
0031
0032 }}
0033
0034 #endif