Boost logo

Boost Users :

From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2007-01-27 12:32:25


Ovanes Markarian wrote:
> Just a small addition. You can also specialize the template in another
> file, that is seen in the translation unit.

Be aware, however, that it's not necessarily a good idea:

If you forget to #include the specialization definition, an
instantiation of is_pointer_like<T>::value can be both 'false' and
'true' in the same program. This scenario can lead to strange effects
that are not necessarily caught at compile time.

You should at least add a forward declaration of the class template
specialization to the header defining the smart pointer (but you might
as well just define the specialization in this case because it's trivial).

Regards,
Tobias


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net