[Boost-users] [fusion] problem with make_map

13 views
Skip to first unread message

Jean-Louis Leroy

unread,
Sep 27, 2009, 4:47:46 AM9/27/09
to boost...@lists.boost.org
I'm trying the make_map example from the doc, nearly verbatim :

#include <boost/fusion/container/generation/make_map.hpp>
#include <boost/fusion/include/make_map.hpp>

int main() {
using namespace boost::fusion;
make_map(
make_pair<int>('X')
, make_pair<double>("Men"));
}

Both msvc9 and g++ 4.4.1 tell me that there is no make_map function that
takes two parameters. g++ mentions that it sees a parameter-less
make_map(). I use Boost 1.40.

What's up ?

Thanks,
J-L

_______________________________________________
Boost-users mailing list
Boost...@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Christopher Schmidt

unread,
Sep 27, 2009, 5:40:59 AM9/27/09
to boost...@lists.boost.org
Jean-Louis Leroy schrieb:

> I'm trying the make_map example from the doc, nearly verbatim :
>
> #include <boost/fusion/container/generation/make_map.hpp>
> #include <boost/fusion/include/make_map.hpp>
>
> int main() {
> using namespace boost::fusion;
> make_map(
> make_pair<int>('X')
> , make_pair<double>("Men"));
> }
>
> Both msvc9 and g++ 4.4.1 tell me that there is no make_map function that
> takes two parameters. g++ mentions that it sees a parameter-less
> make_map(). I use Boost 1.40.
>
> What's up ?
>
> Thanks,
> J-L

This function is not documented correctly.
The correct usage of fusion::make_map is

fusion::make_map<Key0,...KeyN-1>(Value0,...ValueN-1)

-Christopher

Joel de Guzman

unread,
Sep 28, 2009, 2:04:29 AM9/28/09
to boost...@lists.boost.org
Christopher Schmidt wrote:
> Jean-Louis Leroy schrieb:
>> I'm trying the make_map example from the doc, nearly verbatim :
>>
>> #include <boost/fusion/container/generation/make_map.hpp>
>> #include <boost/fusion/include/make_map.hpp>
>>
>> int main() {
>> using namespace boost::fusion;
>> make_map(
>> make_pair<int>('X')
>> , make_pair<double>("Men"));
>> }
>>
>> Both msvc9 and g++ 4.4.1 tell me that there is no make_map function
>> that takes two parameters. g++ mentions that it sees a parameter-less
>> make_map(). I use Boost 1.40.
>>
>> What's up ?
>>
>> Thanks,
>> J-L
>
> This function is not documented correctly.
> The correct usage of fusion::make_map is
>
> fusion::make_map<Key0,...KeyN-1>(Value0,...ValueN-1)

Fixed. Thanks for noticing.

Regards,
--
Joel de Guzman
http://www.boostpro.com
http://spirit.sf.net
http://tinyurl.com/facebook-jdg

Reply all
Reply to author
Forward
0 new messages