Boost logo

Boost :

Subject: Re: [boost] [Review] Boost.Type Traits Extension by Frederic Bron
From: Joachim Faulhaber (afojgo_at_[hidden])
Date: 2011-03-17 10:13:25


2011/3/14 Joel Falcou <joel.falcou_at_[hidden]>:
> Dear All,
>
> This is the first day of the fast track review of Frédéric Bron's extensions
> to the Type Traits Library.This reviews will last until March 18th, 2011
[...]

Hi Frédéric,

thank you again for implementing this has_operator extension. I've
found some problems. In the ICL I have an operator +

template <class Type>
inline typename enable_if
<is_associative_element_container<Type>, Type>::type
operator + (Type object, const typename Type::value_type& operand);

and is seems that more overloads are checked valid as actually exist.
Is this intentional?

BOOST_AUTO_TEST_CASE(has_op_extension_qualifiers)
{
typedef int T;
typedef interval_set<T> IntervalSetT;
typedef IntervalSetT::interval_type IntervalT;

// This is supposed to succeed
BOOST_CHECK((has_operator_plus<IntervalSetT, const IntervalSetT&,
IntervalSetT>::value));

BOOST_CHECK((!is_convertible<const IntervalSetT&, IntervalSetT&>::value));

// These are supposed to fail, but they succeed
BOOST_CHECK((has_operator_plus<IntervalSetT, IntervalSetT&,
IntervalSetT>::value));
BOOST_CHECK((has_operator_plus<IntervalSetT, IntervalSetT,
IntervalSetT>::value));
BOOST_CHECK((has_operator_plus<IntervalSetT, IntervalSetT,
IntervalSetT const&>::value));
}

Regards,
Joachim

-- 
Interval Container Library [Boost.Icl]
http://www.joachim-faulhaber.de

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk