Opened 8 years ago
Closed 8 years ago
#10403 closed Bugs (fixed)
fusion make_map metafunction
Reported by: | Owned by: | Joel de Guzman | |
---|---|---|---|
Milestone: | To Be Determined | Component: | fusion |
Version: | Boost 1.56.0 | Severity: | Problem |
Keywords: | fusion make_map | Cc: |
Description
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
Change History (4)
comment:1 by , 8 years ago
comment:4 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Indeed. Sorry about that. The docs are out of sync in that regard. I'd welcome a documentation patch if you have one. Editing the relevant quickbook file is sufficient. A pull request to https://github.com/boostorg/fusion would be great!