Boost logo

Boost :

Subject: Re: [boost] [Review] Boost.Type Traits Extension by Frederic Bron
From: Frédéric Bron (frederic.bron_at_[hidden])
Date: 2011-03-16 08:51:49


> I actually prefer a "void" return type specified in the trait to mean that you're ignoring the return type of the operator.  This is (more) consistent with the semantics of that template parameter when non-void.

Is it because for other types, it just checks for "convertible to" and
not check for exact type? However, nothing can be converted to void
apart from void so it would be still consistent to have RET=void
checks for exact void return type.

> Checking that the return type is *precisely* void, to me, falls into the general category of checking that the return type satisfies some user-provided MPL metafunction.  What about if you want to check if the return type is an rvalue or lvalue?  Or a Proto expression?  This is why I've been advocating for an extra template parameter to enable this capability for some time now.

I understand you concern and I know you understood that it is beyond
my competencies.

Frédéric


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