/usr/include/boost/container
NameSizeModeActions
detail/-0755rm
pmr/-0755rm
adaptive_pool.hpp233370644editdlrm
allocator.hpp140860644editdlrm
allocator_traits.hpp235620644editdlrm
container_fwd.hpp107720644editdlrm
deque.hpp870250644editdlrm
flat_map.hpp1359490644editdlrm
flat_set.hpp846010644editdlrm
list.hpp585930644editdlrm
map.hpp1035280644editdlrm
new_allocator.hpp62150644editdlrm
node_allocator.hpp125170644editdlrm
node_handle.hpp154480644editdlrm
options.hpp182130644editdlrm
scoped_allocator.hpp392410644editdlrm
scoped_allocator_fwd.hpp21640644editdlrm
set.hpp714090644editdlrm
slist.hpp691940644editdlrm
small_vector.hpp315690644editdlrm
stable_vector.hpp851420644editdlrm
static_vector.hpp431050644editdlrm
string.hpp1283990644editdlrm
throw_exception.hpp68420644editdlrm
uses_allocator.hpp75140644editdlrm
uses_allocator_fwd.hpp25400644editdlrm
vector.hpp1399480644editdlrm
Edit: /usr/include/boost/container/throw_exception.hpp (6842B)
////////////////////////////////////////////////////////////////////////////// // // (C) Copyright Ion Gaztanaga 2012-2013. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/container for documentation. // ////////////////////////////////////////////////////////////////////////////// #ifndef BOOST_CONTAINER_THROW_EXCEPTION_HPP #define BOOST_CONTAINER_THROW_EXCEPTION_HPP #ifndef BOOST_CONFIG_HPP # include #endif #if defined(BOOST_HAS_PRAGMA_ONCE) # pragma once #endif #include #include #ifndef BOOST_NO_EXCEPTIONS #include //for std exception types #include //for implicit std::string conversion #include //for std::bad_alloc #else #include #include //for std::abort #endif namespace boost { namespace container { #if defined(BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS) //The user must provide definitions for the following functions BOOST_NORETURN void throw_bad_alloc(); BOOST_NORETURN void throw_out_of_range(const char* str); BOOST_NORETURN void throw_length_error(const char* str); BOOST_NORETURN void throw_logic_error(const char* str); BOOST_NORETURN void throw_runtime_error(const char* str); #elif defined(BOOST_NO_EXCEPTIONS) BOOST_NORETURN inline void throw_bad_alloc() { const char msg[] = "boost::container bad_alloc thrown"; (void)msg; BOOST_ASSERT(!msg); std::abort(); } BOOST_NORETURN inline void throw_out_of_range(const char* str) { const char msg[] = "boost::container out_of_range thrown"; (void)msg; (void)str; BOOST_ASSERT_MSG(!msg, str); std::abort(); } BOOST_NORETURN inline void throw_length_error(const char* str) { const char msg[] = "boost::container length_error thrown"; (void)msg; (void)str; BOOST_ASSERT_MSG(!msg, str); std::abort(); } BOOST_NORETURN inline void throw_logic_error(const char* str) { const char msg[] = "boost::container logic_error thrown"; (void)msg; (void)str; BOOST_ASSERT_MSG(!msg, str); std::abort(); } BOOST_NORETURN inline void throw_runtime_error(const char* str) { const char msg[] = "boost::container runtime_error thrown"; (void)msg; (void)str; BOOST_ASSERT_MSG(!msg, str); std::abort(); } #else //defined(BOOST_NO_EXCEPTIONS) //! Exception callback called by Boost.Container when fails to allocate the requested storage space. //!
    //!
  • If BOOST_NO_EXCEPTIONS is NOT defined std::bad_alloc() is thrown.
  • //! //!
  • If BOOST_NO_EXCEPTIONS is defined and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS //! is NOT defined BOOST_ASSERT(!"boost::container bad_alloc thrown") is called //! and std::abort() if the former returns.
  • //! //!
  • If BOOST_NO_EXCEPTIONS and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS are defined //! the user must provide an implementation and the function should not return.
  • //!
BOOST_NORETURN inline void throw_bad_alloc() { throw std::bad_alloc(); } //! Exception callback called by Boost.Container to signal arguments out of range. //!
    //!
  • If BOOST_NO_EXCEPTIONS is NOT defined std::out_of_range(str) is thrown.
  • //! //!
  • If BOOST_NO_EXCEPTIONS is defined and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS //! is NOT defined BOOST_ASSERT_MSG(!"boost::container out_of_range thrown", str) is called //! and std::abort() if the former returns.
  • //! //!
  • If BOOST_NO_EXCEPTIONS and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS are defined //! the user must provide an implementation and the function should not return.
  • //!
BOOST_NORETURN inline void throw_out_of_range(const char* str) { throw std::out_of_range(str); } //! Exception callback called by Boost.Container to signal errors resizing. //!
    //!
  • If BOOST_NO_EXCEPTIONS is NOT defined std::length_error(str) is thrown.
  • //! //!
  • If BOOST_NO_EXCEPTIONS is defined and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS //! is NOT defined BOOST_ASSERT_MSG(!"boost::container length_error thrown", str) is called //! and std::abort() if the former returns.
  • //! //!
  • If BOOST_NO_EXCEPTIONS and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS are defined //! the user must provide an implementation and the function should not return.
  • //!
BOOST_NORETURN inline void throw_length_error(const char* str) { throw std::length_error(str); } //! Exception callback called by Boost.Container to report errors in the internal logical //! of the program, such as violation of logical preconditions or class invariants. //!
    //!
  • If BOOST_NO_EXCEPTIONS is NOT defined std::logic_error(str) is thrown.
  • //! //!
  • If BOOST_NO_EXCEPTIONS is defined and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS //! is NOT defined BOOST_ASSERT_MSG(!"boost::container logic_error thrown", str) is called //! and std::abort() if the former returns.
  • //! //!
  • If BOOST_NO_EXCEPTIONS and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS are defined //! the user must provide an implementation and the function should not return.
  • //!
BOOST_NORETURN inline void throw_logic_error(const char* str) { throw std::logic_error(str); } //! Exception callback called by Boost.Container to report errors that can only be detected during runtime. //!
    //!
  • If BOOST_NO_EXCEPTIONS is NOT defined std::runtime_error(str) is thrown.
  • //! //!
  • If BOOST_NO_EXCEPTIONS is defined and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS //! is NOT defined BOOST_ASSERT_MSG(!"boost::container runtime_error thrown", str) is called //! and std::abort() if the former returns.
  • //! //!
  • If BOOST_NO_EXCEPTIONS and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS are defined //! the user must provide an implementation and the function should not return.
  • //!
BOOST_NORETURN inline void throw_runtime_error(const char* str) { throw std::runtime_error(str); } #endif }} //namespace boost { namespace container { #include #endif //#ifndef BOOST_CONTAINER_THROW_EXCEPTION_HPP