File indexing completed on 2025-01-18 09:50:35
0001
0002
0003
0004
0005
0006
0007
0008
0009
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