Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3982: mpl::at documentation out of sync with code
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-05-17 09:33:44
#3982: mpl::at documentation out of sync with code
---------------------------------------------+------------------------------
Reporter: manfred.doudar@⦠| Owner: agurtovoy
Type: Bugs | Status: new
Milestone: Boost 1.43.0 | Component: mpl
Version: Boost 1.42.0 | Severity: Problem
Keywords: mpl::at default |
---------------------------------------------+------------------------------
Comment(by dsaritz@â¦):
In my experience (with MSVC++) implementing the defaulted at as
...
{
typedef typename boost::mpl::at<Seq, Key>::type in_seq;
typedef typename boost::mpl::if_
<
boost::is_same<in_seq, boost::mpl::void_>,
Default,
in_seq
>::type type;
}
or by using find + compare-to-end (instead of void) + deref proved to be
more (compile-time) efficient (probably because of skipping the
instantiation of has_key<>...)...
In any case, the defaulted at should IMO be provided out-of-the-box by MPL
(both because of 'cleanness' and because the library author has the best
chance to make it as efficient as possible)...
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3982#comment:2> 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:03 UTC