[multi_index] BOOST_MULTI_INDEX_CONST_MEM_FUN and member template functions

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[multi_index] BOOST_MULTI_INDEX_CONST_MEM_FUN and member template functions

Felipe Magno de Almeida
Hi,

BOOST_MULTI_INDEX_CONST_MEM_FUN is implemented ths way:

#define BOOST_MULTI_INDEX_CONST_MEM_FUN(Class,Type,MemberFunName) \
::boost::multi_index::const_mem_fun<Class,Type,&Class::MemberFunName>

But when I need to do something like this:

typedef boost::tuple<std::string, std::string> tuple;

BOOST_MULTI_INDEX_CONST_MEM_FUN(tuple, std::string const&, get<0>);

It doesnt work because of the two closing brackets that results from
the macro expansion.
Couldnt be added a space after &Class::MemberFunName ?
Here it works ok adding the space.

Thanks,
--
Felipe Magno de Almeida

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost