$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2008-01-11 05:02:46
Steven Watanabe wrote:
> AMDG
> 
> Tobias Schwinger <tschwinger <at> isonews2.com> writes:
> 
>> Steven Watanabe wrote:
>>> AMDG
>>>
>>> Tobias Schwinger <tschwinger <at> isonews2.com> writes:
>>>
>>>>> I don't think the comma operator
>>>>> is a completely fool-proof way to detect void. 
>>>> It is.
>>>>
>>>>> It could cause an
>>>>> ambiguity if the other type also defines an overloaded comma operator.
>>>> No, because the operator is binary and one operand can have a reserved 
>>>> type which is only internally used by the test code.
>> I hope I haven't promised too much ...
>>
>>> Ok.  Let's make this concrete.  Here is what I imagine:
>> <code>
>>
>> Try the attached code - does it work for you?
> 
> No it doesn't.  None of the versions requiring implicit conversions
> worked.  Did you by any chance compile with NDEBUG?
It works with GCC4. And another overload would be good:
     friend char operator,(T const&, reserved const&);
Regards,
Tobias