From ab9299f9c630e84b0b0c02e4d2146f29f253c785 Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Tue, 25 Sep 2018 11:05:31 +0300 Subject: [PATCH] fix visibility of exceptions within Boost.Graph --- include/boost/graph/bipartite.hpp | 2 +- include/boost/graph/dimacs.hpp | 2 +- include/boost/graph/exception.hpp | 12 ++++++------ include/boost/graph/graphml.hpp | 2 +- include/boost/graph/graphviz.hpp | 10 +++++----- include/boost/graph/loop_erased_random_walk.hpp | 2 +- include/boost/graph/metis.hpp | 4 ++-- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/include/boost/graph/bipartite.hpp b/include/boost/graph/bipartite.hpp index 74316fd53..185196e96 100644 --- a/include/boost/graph/bipartite.hpp +++ b/include/boost/graph/bipartite.hpp @@ -32,7 +32,7 @@ namespace boost { */ template - struct bipartite_visitor_error: std::exception + struct BOOST_SYMBOL_VISIBLE bipartite_visitor_error: std::exception { std::pair witnesses; diff --git a/include/boost/graph/dimacs.hpp b/include/boost/graph/dimacs.hpp index 3e8407dfa..12adba81e 100644 --- a/include/boost/graph/dimacs.hpp +++ b/include/boost/graph/dimacs.hpp @@ -21,7 +21,7 @@ namespace boost { namespace graph { -class dimacs_exception : public std::exception {}; +class BOOST_SYMBOL_VISIBLE dimacs_exception : public std::exception {}; class dimacs_basic_reader { public: diff --git a/include/boost/graph/exception.hpp b/include/boost/graph/exception.hpp index 382d67192..f1f13dcf8 100644 --- a/include/boost/graph/exception.hpp +++ b/include/boost/graph/exception.hpp @@ -15,36 +15,36 @@ namespace boost { - struct bad_graph : public std::invalid_argument { + struct BOOST_SYMBOL_VISIBLE bad_graph : public std::invalid_argument { bad_graph(const std::string& what_arg) : std::invalid_argument(what_arg) { } }; - struct not_a_dag : public bad_graph { + struct BOOST_SYMBOL_VISIBLE not_a_dag : public bad_graph { not_a_dag() : bad_graph("The graph must be a DAG.") { } }; - struct negative_edge : public bad_graph { + struct BOOST_SYMBOL_VISIBLE negative_edge : public bad_graph { negative_edge() : bad_graph("The graph may not contain an edge with negative weight.") { } }; - struct negative_cycle : public bad_graph { + struct BOOST_SYMBOL_VISIBLE negative_cycle : public bad_graph { negative_cycle() : bad_graph("The graph may not contain negative cycles.") { } }; - struct not_connected : public bad_graph { + struct BOOST_SYMBOL_VISIBLE not_connected : public bad_graph { not_connected() : bad_graph("The graph must be connected.") { } }; - struct not_complete : public bad_graph { + struct BOOST_SYMBOL_VISIBLE not_complete : public bad_graph { not_complete() : bad_graph("The graph must be complete.") { } diff --git a/include/boost/graph/graphml.hpp b/include/boost/graph/graphml.hpp index a7faa647b..c8e495c28 100644 --- a/include/boost/graph/graphml.hpp +++ b/include/boost/graph/graphml.hpp @@ -34,7 +34,7 @@ namespace boost ///////////////////////////////////////////////////////////////////////////// // Graph reader exceptions ///////////////////////////////////////////////////////////////////////////// -struct parse_error: public graph_exception +struct BOOST_SYMBOL_VISIBLE parse_error: public graph_exception { parse_error(const std::string& err) {error = err; statement = "parse error: " + error;} virtual ~parse_error() throw() {} diff --git a/include/boost/graph/graphviz.hpp b/include/boost/graph/graphviz.hpp index 1c8cb194a..4ddf8b6ca 100644 --- a/include/boost/graph/graphviz.hpp +++ b/include/boost/graph/graphviz.hpp @@ -616,12 +616,12 @@ namespace boost { ///////////////////////////////////////////////////////////////////////////// // Graph reader exceptions ///////////////////////////////////////////////////////////////////////////// -struct graph_exception : public std::exception { +struct BOOST_SYMBOL_VISIBLE graph_exception : public std::exception { virtual ~graph_exception() throw() {} virtual const char* what() const throw() = 0; }; -struct bad_parallel_edge : public graph_exception { +struct BOOST_SYMBOL_VISIBLE bad_parallel_edge : public graph_exception { std::string from; std::string to; mutable std::string statement; @@ -639,7 +639,7 @@ struct bad_parallel_edge : public graph_exception { } }; -struct directed_graph_error : public graph_exception { +struct BOOST_SYMBOL_VISIBLE directed_graph_error : public graph_exception { virtual ~directed_graph_error() throw() {} virtual const char* what() const throw() { return @@ -648,7 +648,7 @@ struct directed_graph_error : public graph_exception { } }; -struct undirected_graph_error : public graph_exception { +struct BOOST_SYMBOL_VISIBLE undirected_graph_error : public graph_exception { virtual ~undirected_graph_error() throw() {} virtual const char* what() const throw() { return @@ -657,7 +657,7 @@ struct undirected_graph_error : public graph_exception { } }; -struct bad_graphviz_syntax: public graph_exception { +struct BOOST_SYMBOL_VISIBLE bad_graphviz_syntax: public graph_exception { std::string errmsg; bad_graphviz_syntax(const std::string& errmsg) : errmsg(errmsg) {} diff --git a/include/boost/graph/loop_erased_random_walk.hpp b/include/boost/graph/loop_erased_random_walk.hpp index 712c45d7c..5805c2e5b 100644 --- a/include/boost/graph/loop_erased_random_walk.hpp +++ b/include/boost/graph/loop_erased_random_walk.hpp @@ -19,7 +19,7 @@ namespace boost { - struct loop_erased_random_walk_stuck : public std::exception { + struct BOOST_SYMBOL_VISIBLE loop_erased_random_walk_stuck : public std::exception { virtual ~loop_erased_random_walk_stuck() throw() {} inline virtual const char* what() const throw() { return "Loop-erased random walk found a vertex with no out-edges"; diff --git a/include/boost/graph/metis.hpp b/include/boost/graph/metis.hpp index 2ec2fc3e7..f6a1425f3 100644 --- a/include/boost/graph/metis.hpp +++ b/include/boost/graph/metis.hpp @@ -26,8 +26,8 @@ namespace boost { namespace graph { -class metis_exception : public std::exception {}; -class metis_input_exception : public metis_exception {}; +class BOOST_SYMBOL_VISIBLE metis_exception : public std::exception {}; +class BOOST_SYMBOL_VISIBLE metis_input_exception : public metis_exception {}; class metis_reader {