Why isn't there any "dequeS" tag in BGL?
Historical accident. If you'd like we could add your implementation
for deque.
Below you find my implementation for deque.
Regards
Nicola
PS: sorry for forgetting the subject in my previous post, causing a
mess with message threading...
#include
#include
#include <deque>
namespace boost {
namespace graph_detail {
struct deque_tag :
virtual public random_access_container_tag,
virtual public back_insertion_sequence_tag { };
// No front_insertion_sequence_tag?
template
deque_tag container_category(const std::deque&){
return deque_tag();
}
template
unstable_tag iterator_stability(const std::deque&) {
return unstable_tag();
}
#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template
struct container_traits< std::deque > {
typedef deque_tag category;
typedef unstable_tag iterator_stability;
};
#endif
} // namespace graph_detail
struct dequeS { };
template <typename ValueType>
struct container_gen {
typedef typename std::deque<ValueType> type;
};
} // namespace boost
// Test
int main(int, char*[]) {
typedef boost::adjacency_list Graph;
Graph g;
Graph::vertex_descriptor v1, v2;
v1 = boost::add_vertex(g);
v2 = boost::add_vertex(g);
boost::add_edge(v1, v2, g);
}