File indexing completed on 2025-01-18 09:52:31
0001
0002
0003
0004
0005
0006
0007 #ifndef BOOST_STACKTRACE_FRAME_HPP
0008 #define BOOST_STACKTRACE_FRAME_HPP
0009
0010 #include <boost/config.hpp>
0011 #ifdef BOOST_HAS_PRAGMA_ONCE
0012 # pragma once
0013 #endif
0014
0015 #include <iosfwd>
0016 #include <string>
0017
0018 #include <boost/stacktrace/safe_dump_to.hpp> // boost::stacktrace::detail::native_frame_ptr_t
0019
0020 #include <boost/stacktrace/detail/frame_decl.hpp>
0021 #include <boost/stacktrace/detail/push_options.h>
0022
0023 namespace boost { namespace stacktrace {
0024
0025
0026 constexpr inline bool operator< (const frame& lhs, const frame& rhs) noexcept { return lhs.address() < rhs.address(); }
0027 constexpr inline bool operator> (const frame& lhs, const frame& rhs) noexcept { return rhs < lhs; }
0028 constexpr inline bool operator<=(const frame& lhs, const frame& rhs) noexcept { return !(lhs > rhs); }
0029 constexpr inline bool operator>=(const frame& lhs, const frame& rhs) noexcept { return !(lhs < rhs); }
0030 constexpr inline bool operator==(const frame& lhs, const frame& rhs) noexcept { return lhs.address() == rhs.address(); }
0031 constexpr inline bool operator!=(const frame& lhs, const frame& rhs) noexcept { return !(lhs == rhs); }
0032
0033
0034 inline std::size_t hash_value(const frame& f) noexcept {
0035 return reinterpret_cast<std::size_t>(f.address());
0036 }
0037
0038
0039 BOOST_STACKTRACE_FUNCTION std::string to_string(const frame& f);
0040
0041
0042 template <class CharT, class TraitsT>
0043 std::basic_ostream<CharT, TraitsT>& operator<<(std::basic_ostream<CharT, TraitsT>& os, const frame& f) {
0044 return os << boost::stacktrace::to_string(f);
0045 }
0046
0047 }}
0048
0049
0050
0051 #include <boost/stacktrace/detail/pop_options.h>
0052
0053 #ifndef BOOST_STACKTRACE_LINK
0054 # if defined(BOOST_STACKTRACE_USE_NOOP)
0055 # include <boost/stacktrace/detail/frame_noop.ipp>
0056 # elif defined(BOOST_MSVC) || defined(BOOST_STACKTRACE_USE_WINDBG) || defined(BOOST_STACKTRACE_USE_WINDBG_CACHED)
0057 # include <boost/stacktrace/detail/frame_msvc.ipp>
0058 # else
0059 # include <boost/stacktrace/detail/frame_unwind.ipp>
0060 # endif
0061 #endif
0062
0063
0064
0065 #endif