Missing BOOST_NORETURN for user defined functions

BOOST_NORETURN is missing for the interface of the throwning methods when BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS is defined. Without them you can get a `'noreturn' function does return` warning from g++ at `boost/container/static_vector.hpp:46:4`.
This commit is contained in:
Bo Rydberg
2019-12-05 10:14:58 +01:00
committed by GitHub
parent e3f6dc44ad
commit f7409fd6ed

View File

@@ -37,15 +37,15 @@ namespace container {
#if defined(BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS)
//The user must provide definitions for the following functions
void throw_bad_alloc();
BOOST_NORETURN void throw_bad_alloc();
void throw_out_of_range(const char* str);
BOOST_NORETURN void throw_out_of_range(const char* str);
void throw_length_error(const char* str);
BOOST_NORETURN void throw_length_error(const char* str);
void throw_logic_error(const char* str);
BOOST_NORETURN void throw_logic_error(const char* str);
void throw_runtime_error(const char* str);
BOOST_NORETURN void throw_runtime_error(const char* str);
#elif defined(BOOST_NO_EXCEPTIONS)