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