Boost logo

Boost :

From: scleary_at_[hidden]
Date: 2000-10-02 08:16:25


> In the case where there is BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION,
> call_traits<T>::const_reference is a reference type, which can result in
> references-to-references.

1. const_reference is always a reference type.
2. This should only result in ref-to-ref if your compiler does not support
partial specialization NOR the MSVC++ workarounds (would Sun's compiler be
one of these?).

> I guess that's the right choice if you want the
> fastest speed in all cases but you're willing to have your code not
compile
> when T is a reference. I'm in the opposite situation: I want my code to
> always compile, and where available, I want an optimization.

The original reason for call traits was to avoid ref-to-ref; optimization
was added later. So it should work (?) I don't have access to a MSVC
compiler, but just from looking at the code it looks OK AFAICT.

        -Steve


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