Make location member of wrapexcept_location non-const, to enable assignment

This commit is contained in:
Peter Dimov
2022-01-26 17:22:42 +02:00
parent 0bfe1d9261
commit 0287751675

View File

@ -69,9 +69,9 @@ template<class E, class B> struct wrapexcept_add_base<E, B, 2>
struct wrapexcept_location struct wrapexcept_location
{ {
wrapexcept_location() {} wrapexcept_location() {}
explicit wrapexcept_location( boost::source_location const& loc ): loc_( loc ) {} explicit wrapexcept_location( boost::source_location const& loc ): location_( loc ) {}
boost::source_location const loc_; boost::source_location location_;
}; };
} // namespace detail } // namespace detail
@ -265,7 +265,7 @@ template<class E> boost::source_location get_throw_location( E const& e )
#else #else
detail::wrapexcept_location const* p = dynamic_cast< detail::wrapexcept_location const* >( &e ); detail::wrapexcept_location const* p = dynamic_cast< detail::wrapexcept_location const* >( &e );
return p? p->loc_: boost::source_location(); return p? p->location_: boost::source_location();
#endif #endif
} }