Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8690791
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:58:44+00:00 2026-06-12T23:58:44+00:00

After some tests I observer that the stamp_times visitor is the problem: typedef adjacency_list

  • 0

After some tests I observer that the stamp_times visitor is the problem:

typedef adjacency_list <vecS, vecS, undirectedS> Graph;
typedef graph_traits <Graph>::edge_descriptor Edge;
typedef graph_traits <Graph>::vertex_descriptor Vertex;


Graph g(edges.begin(), edges.end(), n);

typedef graph_traits <Graph>::vertices_size_type Size;

std::vector<Size> dtime(num_vertices(g));
Size time = 0;

breadth_first_search(g, s, visitor(make_bfs_visitor(
                       stamp_times(dtime.begin(), time, on_discover_vertex()))));

(I got more less the same error with that code).

I need to use two visitors one to record predecessors and a second one two obtain visiting time.

boost::breadth_first_search
    (g, s,
     boost::visitor(boost::make_bfs_visitor
            (std::make_pair(
            boost::record_predecessors(&p[0], boost::on_tree_edge()),
            stamp_times(dtime.begin(), time, on_discover_vertex())))));

But this code event do not compile. I get following error.

/usr/include/boost/graph/visitors.hpp: In member function ‘void boost::time_stamper<TimeMap, TimeT, Tag>::operator()(Vertex, const Graph&) [with Vertex = long unsigned int, Graph = boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS>, TimeMap = __gnu_cxx::__normal_iterator<long unsigned int*, std::vector<long unsigned int> >, TimeT = long unsigned int, Tag = boost::on_discover_vertex]’:
/usr/include/boost/graph/visitors.hpp:109:8:   instantiated from ‘void boost::detail::invoke_dispatch(Visitor&, T, Graph&, mpl_::true_) [with Visitor = boost::time_stamper<__gnu_cxx::__normal_iterator<long unsigned int*, std::vector<long unsigned int> >, long unsigned int, boost::on_discover_vertex>, T = long unsigned int, Graph = const boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS>, mpl_::true_ = mpl_::bool_<true>]’
/usr/include/boost/graph/visitors.hpp:140:5:   instantiated from ‘void boost::invoke_visitors(Visitor&, T, Graph&, Tag) [with Visitor = boost::time_stamper<__gnu_cxx::__normal_iterator<long unsigned int*, std::vector<long unsigned int> >, long unsigned int, boost::on_discover_vertex>, T = long unsigned int, Graph = const boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS>, Tag = boost::on_discover_vertex]’
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T23:58:45+00:00Added an answer on June 12, 2026 at 11:58 pm

    stamp_times (and the other EventVisitors) expects a WritablePropertyMap. According to this there are specializations of property_traits that allow using c++ pointers as property maps and according to this “Since the iterator of a std::vector (obtained with a call to begin()) is a pointer, the pointer property map method also works for std::vector::iterator”. Apparently this last part is not true with recent versions of g++ (tested on 4.6.3 and 4.7.1). So in order to invoke stamp_times you need to use &dtime[0] instead of dtime.begin().

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After running some tests, I'm convinced there has to be something wrong with my
I want my workflow to Abort after failing some tests. How can I get
I'm having some problems understanding mock objects. What I want is an observer that
I have installed openjdk+tomcat7 on ubuntu EC2 instance. After do some test http and
After working on some test code for open ID authentication, I had a break
I've trying to get some vertical text on a little test webpage after reading
After some time researching and trying different things I still cannot get my @ExceptionHandler
After some desperate assistance regarding prototype.js on Magento. Please see the below product page
After some great help from Josh Mein with a Javascript Hide/Show menu, the menu
After some hours of trying, I want to ask how to loop a video

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.