2
0
mirror of https://github.com/boostorg/graph.git synced 2026-01-29 19:42:11 +00:00

added edges_size_type and vertices_size_type to the adjacency_list_traits

[SVN r33766]
This commit is contained in:
Jeremy Siek
2006-04-22 13:35:32 +00:00
parent 69c5cf732c
commit 62c6d9ef2f

View File

@@ -259,7 +259,8 @@ namespace boost {
template <class OutEdgeListS = vecS,
class VertexListS = vecS,
class DirectedS = directedS>
class DirectedS = directedS,
class EdgeListS = listS>
struct adjacency_list_traits
{
typedef typename detail::is_random_access<VertexListS>::type
@@ -282,6 +283,22 @@ namespace boost {
std::size_t, vertex_ptr>::type vertex_descriptor;
typedef detail::edge_desc_impl<directed_category, vertex_descriptor>
edge_descriptor;
typedef std::size_t vertices_size_type;
private:
// Logic to figure out the edges_size_type
struct dummy {};
typedef typename container_gen<EdgeListS, dummy>::type EdgeContainer;
typedef typename DirectedS::is_bidir_t BidirectionalT;
typedef typename DirectedS::is_directed_t DirectedT;
typedef typename ct_and<DirectedT,
typename ct_not<BidirectionalT>::type >::type on_edge_storage;
public:
typedef typename boost::ct_if_t<on_edge_storage,
std::size_t, typename EdgeContainer::size_type
>::type edges_size_type;
};
} // namespace boost