still problems with has_xxx and shared_ptr...
Hello all!
Sorry to disturb again... I have the following code:
namespace detail
{
BOOST_MPL_HAS_XXX_TRAIT_DEF(element_type)
BOOST_MPL_HAS_XXX_TRAIT_DEF(value_type)
BOOST_MPL_HAS_XXX_TRAIT_DEF(type)
BOOST_MPL_HAS_XXX_TRAIT_DEF(type_t)
}
struct B1
{};
int main()
{
typedef boost::shared_ptr<B1> ptr_t;
typedef
mpl::if_c
<
detail::has_type
How is it possible, if I really can find in the shared_ptr template class the following typedefs:
public:
typedef T element_type;
typedef T value_type;
typedef T * pointer;
typedef typename detail::shared_ptr_traits<T>::reference reference;
For me it is really unclear why does:
detail::has_type
Hi!
I do not expect a really quick input on this issue, but it would be nice to
if anyone could confirm, that this should be checked on boost test systems.
Thanks,
Ovanes
-----Original Message-----
From: Ovanes Markarian [mailto:om_boost@keywallet.com]
Sent: Monday, June 26, 2006 19:23
To: boost-users@lists.boost.org
Subject: [Boost-users] still problems with has_xxx and shared_ptr...
Hello all!
Sorry to disturb again... I have the following code:
namespace detail
{
BOOST_MPL_HAS_XXX_TRAIT_DEF(element_type)
BOOST_MPL_HAS_XXX_TRAIT_DEF(value_type)
BOOST_MPL_HAS_XXX_TRAIT_DEF(type)
BOOST_MPL_HAS_XXX_TRAIT_DEF(type_t)
}
struct B1
{};
int main()
{
typedef boost::shared_ptr<B1> ptr_t;
typedef
mpl::if_c
<
detail::has_type
,boost::mpl::if_c<1,boost::mpl::int_<2>,boost::mpl::if_c<0,boost::mpl::int_ <3>,boost::mpl::int_<-1>
How is it possible, if I really can find in the shared_ptr template class
the following typedefs:
public:
typedef T element_type;
typedef T value_type;
typedef T * pointer;
typedef typename detail::shared_ptr_traits<T>::reference reference;
For me it is really unclear why does:
detail::has_type
participants (1)
-
Ovanes Markarian