|
Ublas : |
Subject: [ublas] Proposed change: use BOOST_TYPEOF
From: Neal Becker (ndbecker2_at_[hidden])
Date: 2009-10-09 08:59:51
Since we have BOOST_TYPEOF, use it in type_traits.hpp:
template<class X, class Y>
struct promote_traits {
typedef type_deduction_detail::base_result_of<X, Y> base_type;
static typename base_type::x_type x;
static typename base_type::y_type y;
// static const std::size_t size = sizeof (
// type_deduction_detail::test<
// typename base_type::x_type
// , typename base_type::y_type
// >(x + y) // Use x+y to stand of all the arithmetic
actions
// );
// static const std::size_t index = (size / sizeof (char)) - 1;
// typedef typename mpl::at_c<
// typename base_type::types, index>::type id;
// typedef typename id::type promote_type;
// typedef typeof (X() + Y()) promote_type;
typedef BOOST_TYPEOF (X() + Y()) promote_type;
};