|
Boost : |
From: Gennaro Prota (gennaro_prota_at_[hidden])
Date: 2003-04-14 11:33:16
On Sat, 12 Apr 2003 17:22:20 +0200, Gennaro Prota
<gennaro_prota_at_[hidden]> wrote:
>On Sat, 12 Apr 2003 11:26:07 +0100, "John Maddock"
><jm_at_[hidden]> wrote:
>
>>We need these added to the config docs as well if/when they are added (into
>>the helper macros section).
>
>Sure. And since I'm the one who has proposed the work I'm willing to
>do it myself and provide a patch, of course.
Just in case it wasn't clear, I was waiting for a response :-)
Anyway, I *was*. To elaborate a bit: if
BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS is really for the VC6
bug I've hinted at then I think it shouldn't have been introduced in
the first place. The reason is that it is the kind of macro that
forces the use of conditionals _whereas_ there's a simple, unique,
pattern to cope with the problem.
For instance we have BOOST_DEDUCED_TYPENAME but nothing like e.g.
BOOST_NO_TYPENAME_IN_DEDUCED_CONTEXTS: the former just takes uniformly
care of the problem, whereas the second, if it existed, would require
repeating basically the same #if/#else at every usage. Analogously,
the problem at hand can be generally solved with a dummy parameter. So
there's no need, for client code, to use a BOOST_NO_xxx macro.
In this case, what macros could have been used? A possibility is:
/* for a single type argument */
BOOST_EXPLICIT_TEMPLATE_TYPE_ARGUMENT(t) ...
/* for 2nd, 3rd, etc. positions */
BOOST_COMMA_AND_EXPLICIT_TEMPLATE_TYPE_ARGUMENT(t) \
, BOOST_EXPLICIT_TEMPLATE_TYPE_ARGUMENT(t)
/* ... */
BOOST_EXPLICIT_TEMPLATE_NON_TYPE_ARGUMENT(v) ...
/* ... */
BOOST_COMMA_AND_EXPLICIT_TEMPLATE_NON_TYPE_ARGUMENT(t) \
, BOOST_EXPLICIT_TEMPLATE_NON_TYPE_ARGUMENT(t)
Unfortunately, these are 4 macros, and I already seem to hear you...
Thus, let's just pretend I never said it! :-)
Genny.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk