[type_traits][cw 9.4] test request

Hello, Could any kind soul with access to CW 9.4 try to compile the following and report the results? #include <boost/type_traits/is_convertible.hpp> #include <memory> class foo{}; typedef boost::is_convertible< const std::auto_ptr<const foo *>, const foo> type; int main() { bool b=type::value; } I've got reasons to think this will fail, and hence spot a problem with boost::is_convertible in CW. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

Joaquín Mª López Muñoz wrote:
Hello,
Could any kind soul with access to CW 9.4 try to compile the following and report the results?
[...] I don't know what it is but it seems like a bug in CW. BTW, Metrowerks' own is_convertible fails for the same reasons. Stefan sError : function call '[std::auto_ptr<const foo *>].auto_ptr({lval} const std::auto_ptr<const foo *>)' does not match 'std::auto_ptr<const foo *>::auto_ptr(std::auto_ptr_ref<const foo *>)' 'std::auto_ptr<const foo *>::auto_ptr(std::auto_ptr<const foo *> &)' 'std::auto_ptr<const foo *>::auto_ptr(const foo **)' (explicit) (point of instantiation: 'main()') (instantiating: 'boost::is_convertible<const std::auto_ptr<const foo *>, const foo>') (instantiating: 'boost::detail::is_convertible_impl_dispatch<const std::auto_ptr<const foo *>, const foo>') (instantiating: 'boost::detail::is_convertible_impl<const std::auto_ptr<const foo *>, const foo>') (instantiating: 'boost::detail::is_convertible_basic_impl<const std::auto_ptr<const foo *> &, const foo>') is_convertible.hpp line 205 );

Stefan Slapeta ha escrito:
Joaquín Mª López Muñoz wrote:
Hello,
Could any kind soul with access to CW 9.4 try to compile the following and report the results?
[...]
I don't know what it is but it seems like a bug in CW. BTW, Metrowerks' own is_convertible fails for the same reasons.
Stefan
[...] Yep, I've already notified the Boost list about it in a previous message. As you have access to a CW compiler, maybe you can play a bit with the implementation of boost::is_convertible. There are six internal implementations of the utility in boost/type_traits/is_convertible.hpp: 1. MS specific 2. Borland older compilers 3. GCC and Borland newer compilers 4. EDG, VisualAge and aCC 5. Digital Mars 6. Other compilers CW is currently using #6, maybe you can test whether it supports, for instance, #4 and if this solves the problem. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo
participants (2)
-
Joaquín Mª López Muñoz
-
Stefan Slapeta