Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:50:35

0001 //
0002 // Boost.Pointer Container
0003 //
0004 //  Copyright Thorsten Ottosen 2003-2005. Use, modification and
0005 //  distribution is subject to the Boost Software License, Version
0006 //  1.0. (See accompanying file LICENSE_1_0.txt or copy at
0007 //  http://www.boost.org/LICENSE_1_0.txt)
0008 //
0009 // For more information, see http://www.boost.org/libs/ptr_container/
0010 //
0011 
0012 #ifndef BOOST_PTR_CONTAINER_EXCEPTION_HPP
0013 #define BOOST_PTR_CONTAINER_EXCEPTION_HPP
0014 
0015 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
0016 # pragma once
0017 #endif
0018 
0019 #include <exception>
0020 
0021 namespace boost
0022 {
0023     class bad_ptr_container_operation : public std::exception
0024     {
0025         const char* what_;
0026     public:
0027         bad_ptr_container_operation( const char* what ) : what_( what )
0028         { }
0029 
0030         virtual const char* what() const throw()
0031         {
0032             return what_;
0033         }
0034     };
0035 
0036 
0037 
0038     class bad_index : public bad_ptr_container_operation
0039     {
0040     public:
0041         bad_index( const char* what ) : bad_ptr_container_operation( what )
0042         { }
0043     };
0044 
0045 
0046 
0047     class bad_pointer : public bad_ptr_container_operation
0048     {
0049     public:
0050         bad_pointer() : bad_ptr_container_operation( "Null pointer not allowed in a pointer container!" )
0051         { }
0052 
0053         bad_pointer( const char* text ) : bad_ptr_container_operation( text )
0054         { }
0055     };
0056 }
0057 
0058 #endif