1 // Copyright Antony Polukhin, 2016-2017.
3 // Distributed under the Boost Software License, Version 1.0. (See
4 // accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
7 #ifndef BOOST_STACKTRACE_DETAIL_UNWIND_BASE_IMPLS_HPP
8 #define BOOST_STACKTRACE_DETAIL_UNWIND_BASE_IMPLS_HPP
10 #include <boost/config.hpp>
11 #ifdef BOOST_HAS_PRAGMA_ONCE
15 #include <boost/stacktrace/frame.hpp>
17 namespace boost { namespace stacktrace { namespace detail {
19 struct to_string_using_nothing {
22 void prepare_function_name(const void* addr) {
23 res = boost::stacktrace::frame(addr).name();
26 bool prepare_source_location(const void* /*addr*/) const BOOST_NOEXCEPT {
31 template <class Base> class to_string_impl_base;
32 typedef to_string_impl_base<to_string_using_nothing> to_string_impl;
34 inline std::string name_impl(const void* /*addr*/) {
40 std::string frame::source_file() const {
44 std::size_t frame::source_line() const {
48 }} // namespace boost::stacktrace
50 #endif // BOOST_STACKTRACE_DETAIL_UNWIND_BASE_IMPLS_HPP