Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-05-26 10:28:37


Howard Hinnant <hinnant_at_[hidden]> writes:

>
> I haven't dug into boost::is_pointer, but I'm guessing it involves a
> tentative binding to an ellipsis:
>
> template <class U> static two test(...);
>
> 5.2.2p7 says that binding a non-POD class type to an ellipsis has
> undefined behavior. CodeWarrior's behavior in this context is to try
> to pass the type by value by using the type's copy constructor, which
> in this case is private, and thus triggers the access error.
>
> Metrowerks::is_pointer has a much simpler implementation.

We should probably be forwarding to the metrowerks implementation on
9.4, where it's available. Failing that we can check is_class first
and avoid the rest of the check in that case.

-- 
Dave Abrahams
Boost Consulting
www.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