$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: David Abrahams (dave_at_[hidden])
Date: 2003-02-19 13:10:58
I'm in love with the new is_convertible; I can now detect "move-copy"
types like auto_ptr! Could the old is_convertible do this?
#include <boost/type_traits/is_convertible.hpp>
#include <boost/static_assert.hpp>
#include <memory>
int main()
{
BOOST_STATIC_ASSERT(
(boost::is_convertible<
std::auto_ptr<int>, std::auto_ptr<int>
>::value));
BOOST_STATIC_ASSERT(
(boost::is_convertible<
std::auto_ptr<int>&, std::auto_ptr<int>
>::value));
BOOST_STATIC_ASSERT(
(!boost::is_convertible<
std::auto_ptr<int> const&, std::auto_ptr<int>
>::value));
BOOST_STATIC_ASSERT(
(!boost::is_convertible<
std::auto_ptr<int> const, std::auto_ptr<int>
>::value));
}
-Dave
-- Dave Abrahams Boost Consulting www.boost-consulting.com