- std::swap(impl_, bt.impl_);
-}
-
-Backtrace& Backtrace::operator=(const Backtrace& rhs)
-{
- if (this != &rhs) {
- if (impl_)
- impl_->unref();
- impl_ = rhs.impl_;
- if (impl_)
- impl_->ref();
- }
- return *this;
-}
-
-Backtrace& Backtrace::operator=(Backtrace&& rhs)
-{
- if (this != &rhs) {
- if (impl_)
- impl_->unref();
- impl_ = rhs.impl_;
- rhs.impl_ = nullptr;
- }
- return *this;
-}
-
-Backtrace::~Backtrace()
-{
- if (impl_)
- impl_->unref();
-}
-
-std::string const Backtrace::resolve() const
-{
- std::string result("");
-
-#if HAVE_BOOST_STACKTRACE_BACKTRACE || HAVE_BOOST_STACKTRACE_ADDR2LINE
- std::stringstream ss;
- ss << impl_->st;
- result.append(ss.str());
-#endif
- return result;