| 1 | // |
| 2 | // Boost.Pointer Container |
| 3 | // |
| 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) |
| 8 | // |
| 9 | // For more information, see http://www.boost.org/libs/ptr_container/ |
| 10 | // |
| 11 | |
| 12 | #ifndef BOOST_PTR_CONTAINER_DETAIL_THROW_EXCEPTION |
| 13 | #define BOOST_PTR_CONTAINER_DETAIL_THROW_EXCEPTION |
| 14 | |
| 15 | #include <boost/assert.hpp> |
| 16 | #include <boost/config.hpp> |
| 17 | |
| 18 | #ifdef BOOST_NO_EXCEPTIONS |
| 19 | #define BOOST_PTR_CONTAINER_NO_EXCEPTIONS |
| 20 | #endif |
| 21 | |
| 22 | #ifdef BOOST_PTR_CONTAINER_NO_EXCEPTIONS |
| 23 | |
| 24 | #define BOOST_PTR_CONTAINER_THROW_EXCEPTION( If, Ex, Msg ) BOOST_ASSERT( !(If) && Msg ) |
| 25 | |
| 26 | #else |
| 27 | |
| 28 | #define BOOST_PTR_CONTAINER_THROW_EXCEPTION( If, Ex, Msg ) if( (If) ) throw Ex ( Msg ) |
| 29 | |
| 30 | #endif // BOOST_PTR_CONTAINER_NO_EXCEPTIONS |
| 31 | |
| 32 | |
| 33 | #endif |
| 34 | |