2 // Boost.Pointer Container
4 // Copyright Thorsten Ottosen 2006. Use, modification and
5 // distribution is subject to the Boost Software License, Version
6 // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
9 // For more information, see http://www.boost.org/libs/ptr_container/
12 #ifndef BOOST_PTR_CONTAINER_DETAIL_THROW_EXCEPTION
13 #define BOOST_PTR_CONTAINER_DETAIL_THROW_EXCEPTION
15 #include <boost/assert.hpp>
16 #include <boost/config.hpp>
18 #ifdef BOOST_NO_EXCEPTIONS
19 #define BOOST_PTR_CONTAINER_NO_EXCEPTIONS
22 #ifdef BOOST_PTR_CONTAINER_NO_EXCEPTIONS
24 #define BOOST_PTR_CONTAINER_THROW_EXCEPTION( If, Ex, Msg ) BOOST_ASSERT( !(If) && Msg )
28 #define BOOST_PTR_CONTAINER_THROW_EXCEPTION( If, Ex, Msg ) if( (If) ) throw Ex ( Msg )
30 #endif // BOOST_PTR_CONTAINER_NO_EXCEPTIONS