[Boost-bugs] [Boost C++ Libraries] #3982: mpl::at documentation out of sync with code

Subject: [Boost-bugs] [Boost C++ Libraries] #3982: mpl::at documentation out of sync with code
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-03-06 11:03:41


#3982: mpl::at documentation out of sync with code
---------------------------------------------+------------------------------
 Reporter: manfred.doudar@… | Owner: agurtovoy
     Type: Bugs | Status: new
Milestone: Boost 1.43.0 | Component: Documentation
  Version: Boost 1.42.0 | Severity: Problem
 Keywords: mpl::at default |
---------------------------------------------+------------------------------
 Documentation of mpl::at indicates that it can take either 2 or 3 template
 parameters, but in fact only takes just 2. The documentation indicates a
 third template parameter to forward a default if lookup fails to find a
 match. This option does not exist.

 Code or Documentation should be amended. If there will be no 3 template
 parameter option, the following would be nice to have in the
 documentation, as how to achieve a default when no match is found:


 typename boost::mpl::eval_if<
     typename boost::mpl::has_key< Map, Key >::type
   , boost::mpl::at< Map, Key >
   , boost::mpl::identity< Default >
>::type

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3982>
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:02 UTC