Subject: [Boost-bugs] [Boost C++ Libraries] #10403: fusion make_map metafunction
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-08-26 10:34:33
#10403: fusion make_map metafunction
-----------------------------------------+---------------------
Reporter: Wojciech Mamrak <wmamrak@â¦> | Owner: djowel
Type: Bugs | Status: new
Milestone: To Be Determined | Component: fusion
Version: Boost 1.56.0 | Severity: Problem
Keywords: fusion make_map |
-----------------------------------------+---------------------
Hello,
It seems documentation is out-of-sync with implementation of fusion's
make_map metafunction, and also the new implementation (using variadic
templates) is inconsistent with previous ones.
The docs [1] say:
result_of::make_map<int, double, char, double>::type
make_map is implemented as a metafunction class, i.e. it does not have a
nested type typedef:
template <typename ...Key>
struct make_map
{
template <typename ...T>
struct apply
{
typedef map<
fusion::pair<
Key
, typename detail::as_fusion_element<T>::type
>...>
type;
};
};
so the proper "call" would be:
result_of::make_map<int, double>::apply<char, double>::type
From this I conclude it is not only a documentation error, but also api
breach. Presumably it got unnoticed since make_map function is not using
make_map metafunction anymore (as opposed to what the docs claim [2]).
regards
[1]
http://www.boost.org/doc/libs/1_56_0/libs/fusion/doc/html/fusion/container/generation/metafunctions/make_map.html
[2]
http://www.boost.org/doc/libs/1_56_0/libs/fusion/doc/html/fusion/container/generation/functions/make_map.html
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/10403> 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:16 UTC