safe_dump_noop.ipp 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright Antony Polukhin, 2016-2019.
  2. //
  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)
  6. #ifndef BOOST_STACKTRACE_DETAIL_SAFE_DUMP_NOOP_IPP
  7. #define BOOST_STACKTRACE_DETAIL_SAFE_DUMP_NOOP_IPP
  8. #include <boost/config.hpp>
  9. #ifdef BOOST_HAS_PRAGMA_ONCE
  10. # pragma once
  11. #endif
  12. #include <boost/stacktrace/safe_dump_to.hpp>
  13. namespace boost { namespace stacktrace { namespace detail {
  14. #if defined(BOOST_WINDOWS)
  15. std::size_t dump(void* /*fd*/, const native_frame_ptr_t* /*frames*/, std::size_t /*frames_count*/) BOOST_NOEXCEPT {
  16. return 0;
  17. }
  18. #else
  19. std::size_t dump(int /*fd*/, const native_frame_ptr_t* /*frames*/, std::size_t /*frames_count*/) BOOST_NOEXCEPT {
  20. return 0;
  21. }
  22. #endif
  23. std::size_t dump(const char* /*file*/, const native_frame_ptr_t* /*frames*/, std::size_t /*frames_count*/) BOOST_NOEXCEPT {
  24. return 0;
  25. }
  26. }}} // namespace boost::stacktrace::detail
  27. #endif // BOOST_STACKTRACE_DETAIL_SAFE_DUMP_NOOP_IPP