Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2008-05-01 15:10:21


on Mon Apr 28 2008, "Marco Costalba" <mcostalba-AT-gmail.com> wrote:

> On Mon, Apr 28, 2008 at 6:48 PM, Steven Watanabe <watanabesj_at_[hidden]> wrote:
>>
>> There's a page in the proto documentation that describes a solution.
>>
>
> If the page you refer to is: "Detecting the Arity of Function Objects"
>
> under the link:
>
> http://boost-sandbox.sourceforge.net/libs/proto/doc/html/boost_proto/appendices/implementation/function_arity.html
>
>
> Then I have to say: WOW !!!!!! this is metaprogramming virtuosism to
> the highest level.

Isn't there the issue that passing non-PODs through ... is undefined
behavior (note that the standard doesn't say you have to execute the
code to cause the undefined behavior, and GCC will warn about it IIRC)?
I avoided it for that reason in boost/detail/is_incrementable.hpp.

-- 
Dave Abrahams
Boost Consulting
http://boost-consulting.com

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