Boost logo

Boost :

From: Gennaro Prota (gennaro_prota_at_[hidden])
Date: 2003-04-11 06:49:03


On Fri, 11 Apr 2003 11:39:49 +0100, "John Maddock"
<jm_at_[hidden]> wrote:

>We currently have BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS which is set
>for that defect - though it's not really well named.

Ah! Then, grepping for that, I have found a usage for the new macro in
tuple/detail/tuple_basic.hpp too.

>>
>> #define BOOST_DUMMY_DEFAULT_ARGUMENT(t) t* = 0
>
>Not a bad idea if you want to add it to config/suffix.hpp:
>
>#ifndef BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
># define BOOST_DUMMY_DEFAULT_ARGUMENT(t)
>#else
># define BOOST_DUMMY_DEFAULT_ARGUMENT(t) t* = 0
>#endif

Thanks. There's just one thing I've cheated about: the above form is
only suitable for the first parameter, as it lacks a comma.

Should we have two separate macros?

#ifndef BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
# define BOOST_DUMMY_DEFAULTED_PARAM(t)
# define BOOST_APPEND_DUMMY_DEFAULTED_PARAM(t)
#else
# define BOOST_DUMMY_DEFAULTED_PARAM(t) t* = 0
# define BOOST_APPEND_DUMMY_DEFAULTED_PARAM(t) \
               , BOOST_DUMMY_DEFAULTED_PARAM(t)
#endif

or is there a better solution?

>As long as the authors of those libraries are prepared to use it and make
>the necessary changes...

Yeah, I can vouch for one of those libraries :-)

Genny.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk