Boost logo

Boost :

From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2008-07-04 02:18:07


Michael Marcin skrev:
> Michael Marcin wrote:
>> Alex MDC wrote:
>>> Have a look at the Call Traits library, in particular "param_type".
>>>
>>
>> Never noticed that library. Thanks I'll have a look.
>>
>
> The documentation makes no mention of allowing extension for user
> defined types. It in fact has a table which clearly states that
> param_type is a const reference for all user defined types.
>

>
> I would like to take classes like this and specialized param_type for
> them but the documentation for this library doesn't seem to allow for that.

That addition would be most well-come. As it is know, the trait is a bit
naive.

I think the trait should at least use pass by value if both

   a. the size of the types is smaller than sizeof(long double)

   b. the type is a POD

For certain architectures, it might be beneficial to make pass-by value
for larger types, on others perhaps only for smaller.

Now, if that change was added, it also provided the customization that
you needed, because you would simlpy customize is_pod. And that has
other benefits on its own.

John, is the user allowed to specialize is_pod?

Thanks

-Thorsten


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