[BGL] [Property Map] PropertyGraph concept

Hi to all, I've taked a look to the PropertyGraph concept, and it defines the following valid expression: get(p, g, x) and its return type: boost::property_traits<Map>::*value_type* Also the docs of Property Map library says that the get() function return the property *by value*, making a copy of the property. But looking to the \boost\graph\detail\adjacency_list.hpp file, I've noticed that the return value of the get function is: typename boost::property_traits< typename boost::property_map<typename Config::graph_type, Property>::type >::*reference* Why this difference? Or they are the same think? Which is the correct specific? Thanks in advance, Cosimo Calabrese.

Why this difference? Or they are the same think?
Which is the correct specific?
That could be an error in the documentation. Properties are returned by reference whenever possible (i.e., the underlying property map returns by reference). However, the function: get(p, g) will return a /property map/ by value. Andrew Sutton andrew.n.sutton@gmail.com
participants (2)
-
Andrew Sutton
-
Cosimo Calabrese