Boost logo

Boost :

From: Michael Marcin (mike.marcin_at_[hidden])
Date: 2008-07-07 11:47:11


John Maddock wrote:
>
>
> There's nothing to stop you from adding a full or partial specialisation
> of call_traits to your header:
>
> struct my_value_type{ ... };
>
> namespace boost{
>
> template<>
> struct call_traits<my_value_type>
> {
> typedef my_value_type value_type;
> typedef my_value_type& reference;
> typedef my_value_type const& const_reference;
> typedef my_value_type param_type;
> };
>
> } // namespace
>
> Then once your functions are call_traits aware, it's then easy to tweek
> behaviour by adding specialisations as required.
>
> Does this help?
>

Yes this likely solves my problem. I hope the documentation can be
updated to mention that specialization for user defined types is supported.

Thanks,

Michael Marcin


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