--- a/epoc32/include/stdapis/boost/graph/exception.hpp Wed Mar 31 12:27:01 2010 +0100
+++ b/epoc32/include/stdapis/boost/graph/exception.hpp Wed Mar 31 12:33:34 2010 +0100
@@ -1,58 +1,44 @@
-//
-// Boost.Pointer Container
-//
-// Copyright Thorsten Ottosen 2003-2005. Use, modification and
-// distribution is subject to the Boost Software License, Version
-// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// For more information, see http://www.boost.org/libs/ptr_container/
+//=======================================================================
+// Copyright 2002 Indiana University.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
-#ifndef BOOST_PTR_CONTAINER_EXCEPTION_HPP
-#define BOOST_PTR_CONTAINER_EXCEPTION_HPP
+#ifndef BOOST_GRAPH_EXCEPTION_HPP
+#define BOOST_GRAPH_EXCEPTION_HPP
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif
+#include <stdexcept>
+#include <string>
+
+namespace boost {
-#include <exception>
+ struct bad_graph : public std::invalid_argument {
+ bad_graph(const std::string& what_arg)
+ : std::invalid_argument(what_arg) { }
+ };
-namespace boost
-{
- class bad_ptr_container_operation : public std::exception
- {
- const char* what_;
- public:
- bad_ptr_container_operation( const char* what ) : what_( what )
- { }
-
- virtual const char* what() const throw()
- {
- return what_;
- }
- };
+ struct not_a_dag : public bad_graph {
+ not_a_dag()
+ : bad_graph("The graph must be a DAG.") { }
+ };
+ struct negative_edge : public bad_graph {
+ negative_edge()
+ : bad_graph("The graph may not contain an edge with negative weight."){ }
+ };
-
- class bad_index : public bad_ptr_container_operation
- {
- public:
- bad_index( const char* what ) : bad_ptr_container_operation( what )
- { }
- };
-
-
+ struct negative_cycle : public bad_graph {
+ negative_cycle()
+ : bad_graph("The graph may not contain negative cycles.") { }
+ };
+ struct not_connected : public bad_graph {
+ not_connected()
+ : bad_graph("The graph must be connected.") { }
+ };
- class bad_pointer : public bad_ptr_container_operation
- {
- public:
- bad_pointer() : bad_ptr_container_operation( "Null pointer not allowed in a pointer container!" )
- { }
-
- bad_pointer( const char* text ) : bad_ptr_container_operation( text )
- { }
- };
-}
+} // namespace boost
-#endif
+#endif // BOOST_GRAPH_EXCEPTION_HPP