mirror of
https://github.com/boostorg/container.git
synced 2025-08-01 05:24:31 +02:00
Avoid dependency on boost::ignore_unused
This commit is contained in:
@@ -152,6 +152,14 @@
|
||||
//#define BOOST_CONTAINER_USE_STD_EXCEPTIONS
|
||||
|
||||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
|
||||
template <typename T1>
|
||||
BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore(T1 const&)
|
||||
{}
|
||||
|
||||
}} //namespace boost::container {
|
||||
|
||||
|
||||
#endif //#ifndef BOOST_CONTAINER_DETAIL_WORKAROUND_HPP
|
||||
|
@@ -21,7 +21,6 @@
|
||||
|
||||
#include <boost/container/detail/config_begin.hpp>
|
||||
#include <boost/container/detail/workaround.hpp>
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
|
||||
#ifndef BOOST_NO_EXCEPTIONS
|
||||
#include <exception> //for std exception base
|
||||
@@ -156,28 +155,28 @@ namespace container {
|
||||
|
||||
BOOST_NORETURN inline void throw_out_of_range(const char* str)
|
||||
{
|
||||
boost::ignore_unused(str);
|
||||
boost::container::ignore(str);
|
||||
BOOST_ASSERT_MSG(!"boost::container out_of_range thrown", str);
|
||||
std::abort();
|
||||
}
|
||||
|
||||
BOOST_NORETURN inline void throw_length_error(const char* str)
|
||||
{
|
||||
boost::ignore_unused(str);
|
||||
boost::container::ignore(str);
|
||||
BOOST_ASSERT_MSG(!"boost::container length_error thrown", str);
|
||||
std::abort();
|
||||
}
|
||||
|
||||
BOOST_NORETURN inline void throw_logic_error(const char* str)
|
||||
{
|
||||
boost::ignore_unused(str);
|
||||
boost::container::ignore(str);
|
||||
BOOST_ASSERT_MSG(!"boost::container logic_error thrown", str);
|
||||
std::abort();
|
||||
}
|
||||
|
||||
BOOST_NORETURN inline void throw_runtime_error(const char* str)
|
||||
{
|
||||
boost::ignore_unused(str);
|
||||
boost::container::ignore(str);
|
||||
BOOST_ASSERT_MSG(!"boost::container runtime_error thrown", str);
|
||||
std::abort();
|
||||
}
|
||||
|
Reference in New Issue
Block a user