On Friday, January 24, 2003, at 09:12 PM, Howard Hinnant wrote:
Sorry, my example (from memory) was inaccurate:struct A { private: A(const A&); };struct B : A { }; char test[is_convertible<B, A>::value]; On Metrowerks this gives: Error : illegal access from 'A' to protected/private member 'A::A(const A &)' (instantiating: 'is_convertible<B, A>') main.cpp line 14 tatic const bool value = sizeof(is_convertible_helper<U>::test(make<T>())) == 1;
#include <msl_utility>
struct A
{
};
struct B
{
private:
B(const B&);
};
char test[!Metrowerks::is_convertible<B, A>::value];
Error : illegal access from 'B' to protected/private member 'B::B(const B &)'
(instantiating: 'Metrowerks::is_convertible<B, A>')
msl_utility line 472 tatic const bool value = sizeof(is_convertible_helper<U>::test(make<T>())) == 1;
Haven't tried it with boost::is_convertible, but I suspect it would have the same problem.
-Howard
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost