[Boost-bugs] [Boost C++ Libraries] #5273: question about fusion and documentation

Subject: [Boost-bugs] [Boost C++ Libraries] #5273: question about fusion and documentation
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-03-07 06:07:01


#5273: question about fusion and documentation
------------------------------+---------------------------------------------
 Reporter: ramey@… | Owner: danmarsden
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: fusion
  Version: Boost 1.45.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------------------------------
 I'm having a problem distinguishing the difference between metafunctions
 at_key and value_at_key. The documentation for value_at_key shows the
 following example:

 {{{
 typedef map<pair<int, char>, pair<char, char>, pair<double, char> > mymap;
 BOOST_MPL_ASSERT((boost::is_same<result_of::at_key<mymap, int>::type,
 char>));
 }}}

 note the absence of value_at_key in the example!
 while the example in at_key shows

 {{{
 typedef map<pair<int, char>, pair<char, char>, pair<double, char> > mymap;
 BOOST_MPL_ASSERT((boost::is_same<result_of::at_key<mymap, int>::type,
 char&>));
 }}}

 I see the & indicating a reference, but I can't see how this would be any
 different than using add_reference to the result of at_value_key.

 Any little bit of light you might want shed here would be helpful. At the
 very least, I think the documention should be clarified.

 Robert Ramey

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5273>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:05 UTC