Boost logo

Boost :

From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2004-09-14 18:51:48

Terje Slettebø wrote:

>>From: "Tobias Schwinger" <tschwinger_at_[hidden]>
>>Further I doubt there is a chance of weakening the "no-match-overload"
>>in any other way to match worse than a function with one user defined
>>conversion per argument.
> Actually, there is...:
> [...]

First of all thanks for taking the time to write such an encouraging
reply to my capitulation ;+).

It seems to me that we are referring to different parts of this discussion:

Daniel Wallin writes:
> check_add<float, int*>
> Would trigger a compilation error otherwise.

'has_plus_op<float,int*>' fails for the same reason (the expression
inside the function call becomes invalid).

I tried putting the arguments inside the expression into classes with an
implicit conversion operator - but failed coming up with a "no match
overload" weak enough. According to 13.1-3 I don't think there is.
'enable_if' could probably do the trick - using a modern compiler
supporting it, that is.
Another solution could be to hard-wire the cases which cause errors into
specializations (discarding Daniel's idea of a generalized facility or
using a hell of a lot preprocessor metaprogramming).

Best regards,


Boost list run by bdawes at, gregod at, cpdaniel at, john at