mirror of
https://github.com/boostorg/graph.git
synced 2026-01-31 08:12:14 +00:00
Graph: Remove obsolete MSVC version checks.
[SVN r85934]
This commit is contained in:
@@ -329,7 +329,6 @@ namespace boost {
|
||||
: Base(num_vertices), m_property(new graph_property_type(p))
|
||||
{ }
|
||||
|
||||
#if !defined(BOOST_MSVC) || BOOST_MSVC >= 1300
|
||||
// Required by Iterator Constructible Graph
|
||||
template <class EdgeIterator>
|
||||
adjacency_list(EdgeIterator first, EdgeIterator last,
|
||||
@@ -347,7 +346,6 @@ namespace boost {
|
||||
const GraphProperty& p = GraphProperty())
|
||||
: Base(n, first, last, ep_iter), m_property(new graph_property_type(p))
|
||||
{ }
|
||||
#endif
|
||||
|
||||
void swap(adjacency_list& x) {
|
||||
// Is there a more efficient way to do this?
|
||||
|
||||
@@ -443,9 +443,7 @@ namespace boost {
|
||||
// graph type. Instead, use directedS, which also provides the
|
||||
// functionality required for a Bidirectional Graph (in_edges,
|
||||
// in_degree, etc.).
|
||||
#if !defined(_MSC_VER) || _MSC_VER > 1300
|
||||
BOOST_STATIC_ASSERT(type_traits::ice_not<(is_same<Directed, bidirectionalS>::value)>::value);
|
||||
#endif
|
||||
|
||||
typedef typename mpl::if_<is_directed,
|
||||
bidirectional_tag, undirected_tag>::type
|
||||
@@ -480,13 +478,11 @@ namespace boost {
|
||||
typedef adjacency_matrix_traits<Directed> Traits;
|
||||
|
||||
public:
|
||||
#if !defined(BOOST_MSVC) || BOOST_MSVC > 1300
|
||||
// The bidirectionalS tag is not allowed with the adjacency_matrix
|
||||
// graph type. Instead, use directedS, which also provides the
|
||||
// functionality required for a Bidirectional Graph (in_edges,
|
||||
// in_degree, etc.).
|
||||
BOOST_STATIC_ASSERT(!(is_same<Directed, bidirectionalS>::value));
|
||||
#endif
|
||||
|
||||
typedef GraphProperty graph_property_type;
|
||||
typedef typename lookup_one_property<GraphProperty, graph_bundle_t>::type graph_bundled;
|
||||
@@ -500,10 +496,9 @@ namespace boost {
|
||||
public: // should be private
|
||||
typedef typename mpl::if_<typename has_property<edge_property_type>::type,
|
||||
std::pair<bool, edge_property_type>, char>::type StoredEdge;
|
||||
#if (defined(BOOST_MSVC) && BOOST_MSVC <= 1300) || defined(BOOST_NO_STD_ALLOCATOR)
|
||||
#if defined(BOOST_NO_STD_ALLOCATOR)
|
||||
typedef std::vector<StoredEdge> Matrix;
|
||||
#else
|
||||
// This causes internal compiler error for MSVC
|
||||
typedef typename Allocator::template rebind<StoredEdge>::other Alloc;
|
||||
typedef std::vector<StoredEdge, Alloc> Matrix;
|
||||
#endif
|
||||
|
||||
@@ -265,17 +265,7 @@ namespace boost {
|
||||
{
|
||||
typename graph_traits<Graph>::adjacency_iterator vi, viend, found;
|
||||
boost::tie(vi, viend) = adjacent_vertices(a, g);
|
||||
#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300 && defined(__SGI_STL_PORT)
|
||||
// Getting internal compiler error with std::find()
|
||||
found = viend;
|
||||
for (; vi != viend; ++vi)
|
||||
if (*vi == b) {
|
||||
found = vi;
|
||||
break;
|
||||
}
|
||||
#else
|
||||
found = std::find(vi, viend, b);
|
||||
#endif
|
||||
if ( found == viend )
|
||||
return false;
|
||||
|
||||
@@ -283,17 +273,7 @@ namespace boost {
|
||||
out_found;
|
||||
boost::tie(oi, oiend) = out_edges(a, g);
|
||||
|
||||
#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300 && defined(__SGI_STL_PORT)
|
||||
// Getting internal compiler error with std::find()
|
||||
out_found = oiend;
|
||||
for (; oi != oiend; ++oi)
|
||||
if (target(*oi, g) == b) {
|
||||
out_found = oi;
|
||||
break;
|
||||
}
|
||||
#else
|
||||
out_found = std::find_if(oi, oiend, incident_to(b, g));
|
||||
#endif
|
||||
if (out_found == oiend)
|
||||
return false;
|
||||
return true;
|
||||
|
||||
@@ -289,8 +289,6 @@ namespace boost {
|
||||
BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph,vertex_list_graph_tag))
|
||||
{ write_graphviz(out, g, vpw, epw, gpw, get(vertex_index, g)); }
|
||||
|
||||
#if !defined(BOOST_MSVC) || BOOST_MSVC > 1300
|
||||
// ambiguous overload problem with VC++
|
||||
template <typename Graph>
|
||||
inline void
|
||||
write_graphviz(std::ostream& out, const Graph& g
|
||||
@@ -300,7 +298,6 @@ namespace boost {
|
||||
default_writer gw;
|
||||
write_graphviz(out, g, dw, dw, gw);
|
||||
}
|
||||
#endif
|
||||
|
||||
template <typename Graph, typename VertexWriter>
|
||||
inline void
|
||||
@@ -349,21 +346,7 @@ namespace boost {
|
||||
typename Graph::const_children_iterator i_child, j_child;
|
||||
|
||||
//print graph/node/edge attributes
|
||||
#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
|
||||
typedef typename graph_property<Graph, graph_graph_attribute_t>::type
|
||||
GAttrMap;
|
||||
typedef typename graph_property<Graph, graph_vertex_attribute_t>::type
|
||||
NAttrMap;
|
||||
typedef typename graph_property<Graph, graph_edge_attribute_t>::type
|
||||
EAttrMap;
|
||||
GAttrMap gam = get_property(g, graph_graph_attribute);
|
||||
NAttrMap nam = get_property(g, graph_vertex_attribute);
|
||||
EAttrMap eam = get_property(g, graph_edge_attribute);
|
||||
graph_attributes_writer<GAttrMap, NAttrMap, EAttrMap> writer(gam, nam, eam);
|
||||
writer(out);
|
||||
#else
|
||||
make_graph_attributes_writer(g)(out);
|
||||
#endif
|
||||
|
||||
//print subgraph
|
||||
for ( boost::tie(i_child,j_child) = g.children();
|
||||
@@ -382,15 +365,7 @@ namespace boost {
|
||||
if ( vertex_marker[pos] ) {
|
||||
vertex_marker[pos] = false;
|
||||
out << escape_dot_string(pos);
|
||||
#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
|
||||
typedef typename property_map<Graph, vertex_attribute_t>::const_type
|
||||
VertexAttributeMap;
|
||||
attributes_writer<VertexAttributeMap> vawriter(get(vertex_attribute,
|
||||
g.root()));
|
||||
vawriter(out, v);
|
||||
#else
|
||||
make_vertex_attributes_writer(g.root())(out, v);
|
||||
#endif
|
||||
out << ";" << std::endl;
|
||||
}
|
||||
}
|
||||
@@ -403,14 +378,7 @@ namespace boost {
|
||||
edge_marker[pos] = false;
|
||||
out << escape_dot_string(get(vertex_id, u)) << " " << Traits::delimiter()
|
||||
<< " " << escape_dot_string(get(vertex_id, v));
|
||||
#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
|
||||
typedef typename property_map<Graph, edge_attribute_t>::const_type
|
||||
EdgeAttributeMap;
|
||||
attributes_writer<EdgeAttributeMap> eawriter(get(edge_attribute, g));
|
||||
eawriter(out, *ei);
|
||||
#else
|
||||
make_edge_attributes_writer(g)(out, *ei); //print edge properties
|
||||
#endif
|
||||
out << ";" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,12 +27,6 @@
|
||||
#include <boost/mpl/not.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
// Stay out of the way of the concept checking class
|
||||
# define Graph Graph_
|
||||
# define RandomAccessContainer RandomAccessContainer_
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
|
||||
enum default_color_type { white_color, gray_color, green_color, red_color, black_color };
|
||||
|
||||
@@ -13,11 +13,6 @@
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
// Stay out of the way of the concept checking class
|
||||
# define BidirectionalGraph BidirectionalGraph_
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
|
||||
struct reverse_graph_tag { };
|
||||
|
||||
@@ -21,11 +21,6 @@
|
||||
#include <boost/graph/graph_traits.hpp>
|
||||
#include <boost/limits.hpp>
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
// Stay out of the way of the concept checking class
|
||||
# define Graph Graph_
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
|
||||
// This is a bit more convenient than std::numeric_limits because
|
||||
@@ -123,16 +118,6 @@ namespace boost {
|
||||
detail::invoke_dispatch(vlist.first, x, g, IsSameTag());
|
||||
invoke_visitors(vlist.second, x, g, tag);
|
||||
}
|
||||
#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
|
||||
template <class Visitor, class T, class Graph, class Tag>
|
||||
inline void
|
||||
invoke_visitors(base_visitor<Visitor>& vis, T x, Graph& g, Tag) {
|
||||
typedef typename Visitor::event_filter Category;
|
||||
typedef typename is_same<Category, Tag>::type IsSameTag;
|
||||
Visitor& v = static_cast<Visitor&>(vis);
|
||||
detail::invoke_dispatch(v, x, g, IsSameTag());
|
||||
}
|
||||
#else
|
||||
template <class Visitor, class T, class Graph, class Tag>
|
||||
inline void
|
||||
invoke_visitors(Visitor& v, T x, Graph& g, Tag) {
|
||||
@@ -140,7 +125,6 @@ namespace boost {
|
||||
typedef typename is_same<Category, Tag>::type IsSameTag;
|
||||
detail::invoke_dispatch(v, x, g, IsSameTag());
|
||||
}
|
||||
#endif
|
||||
|
||||
//========================================================================
|
||||
// predecessor_recorder
|
||||
@@ -313,9 +297,4 @@ namespace boost {
|
||||
|
||||
} /* namespace boost */
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
// Stay out of the way of the concept checking class
|
||||
# undef Graph
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user