
From: David Abrahams <dave@boost-consulting.com>
David Abrahams <dave@boost-consulting.com> writes:
and the example taking a non-const reference is confusing. I'll shuffle things around.
Done.
Much better. On the other hand\x{2014}as you may recall from the parameter table\x{2014}``color_map`` is an \x{201C}out\x{201D} parameter, so it really should be passed by non-const reference. Note that "color_map" and "out" are quoted significantly differently with no apparent reason. A keyword object has a pair of operator= overloads that ensure we can pass anything by name, but when an \x{201C}out\x{201D} parameter is passed positionally, that's no help: in this case, core::depth_first_search would end up with a const reference to the color_map and compilation will fail when mutating operations are used on it. That's a long sentence and did you really mean to say "we can pass *anything*" (emphasis mine)? Perhaps this would be better: A keyword object has a pair of operator = overloads that ensure we can pass references to const or non-const objects by name, but when an "out" parameter is passed positionally, that's no help. In that case, core:;depth_first_search would end up with a...." -- Rob Stewart stewart@sig.com Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer;