|
Boost : |
From: Daryle Walker (darylew_at_[hidden])
Date: 2001-06-21 18:26:52
I tried to compile the Tuples library under review. I got some errors. I
know I have an old compiler (Metrowerks CodeWarrior Pro 5.3/Mac), but these
errors may reveal some other underlying problems.
From another_tuple_test_bench:
//=========================================================================
Error : function call 'cons(const int, const boost::tuples::nil, const
boost::tuples::nil, const boost::tuples::nil, const boost::tuples::nil,
const boost::tuples::nil, const boost::tuples::nil, const
boost::tuples::nil, const boost::tuples::nil, const boost::tuples::nil)'
does not match
'boost::tuples::cons<int>::cons(T1_0 &, const boost::tuples::nil &, const
boost::tuples::nil &, const boost::tuples::nil &, const boost::tuples::nil
&, const boost::tuples::nil &, const boost::tuples::nil &, const
boost::tuples::nil &, const boost::tuples::nil &, const boost::tuples::nil
&)'
'boost::tuples::cons<int>::cons(const boost::tuples::cons<T1_0,
boost::tuples::nil> &)'
'boost::tuples::cons<int>::cons(const boost::tuples::cons<int,
boost::tuples::nil> &)'
(instantiating: 'boost::tuples::tuple<int, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil>::tuple(const int &, const
boost::tuples::nil &, const boost::tuples::nil &, const boost::tuples::nil
&, const boost::tuples::nil &, const boost::tuples::nil &, const
boost::tuples::nil &, const boost::tuples::nil &, const boost::tuples::nil
&, const boost::tuples::nil &)')
tuple_basic.hpp line 398 : inherited(t1, t2, t3, t4, t5, t6, t7,
t8, t9, t10) {}
Error : cannot convert
'int &' to
'int'
(instantiating: 'boost::tuples::tuple<int &, float &, foo &,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil>')
tuple_basic.hpp line 398 : inherited(t1, t2, t3, t4, t5, t6, t7,
t8, t9, t10) {}
Error : cannot convert
'float &' to
'float'
(instantiating: 'boost::tuples::tuple<int &, float &, foo &,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil>')
tuple_basic.hpp line 398 : inherited(t1, t2, t3, t4, t5, t6, t7,
t8, t9, t10) {}
Error : cannot convert
'foo &' to
'foo'
(instantiating: 'boost::tuples::tuple<int &, float &, foo &,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil>')
tuple_basic.hpp line 398 : inherited(t1, t2, t3, t4, t5, t6, t7,
t8, t9, t10) {}
Error : cannot convert
'int &' to
'int'
(instantiating: 'boost::tuples::tuple<int &,
boost::tuples::detail::swallow_assign &, foo &, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil>')
tuple_basic.hpp line 398 : inherited(t1, t2, t3, t4, t5, t6, t7,
t8, t9, t10) {}
Error : cannot convert
'boost::tuples::detail::swallow_assign &' to
'boost::tuples::detail::swallow_assign'
(instantiating: 'boost::tuples::tuple<int &,
boost::tuples::detail::swallow_assign &, foo &, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil>')
tuple_basic.hpp line 398 : inherited(t1, t2, t3, t4, t5, t6, t7,
t8, t9, t10) {}
//=========================================================================
The problems are all on the same line. The first error has the cursor on
the closing parenthesis. The other errors have the cursor on the colon.
From io_test:
//=========================================================================
Error : function call 'cons(const int, const int, const int, const
boost::tuples::nil, const boost::tuples::nil, const boost::tuples::nil,
const boost::tuples::nil, const boost::tuples::nil, const
boost::tuples::nil, const boost::tuples::nil)' does not match
'boost::tuples::cons<int, boost::tuples::cons<int, boost::tuples::cons<int,
boost::tuples::nil>>>::cons(T1_0 &, T1_1 &, T1_2 &, T1_3 &, T1_4 &, T1_5 &,
T1_6 &, T1_7 &, T1_8 &, T1_9 &)'
'boost::tuples::cons<int, boost::tuples::cons<int, boost::tuples::cons<int,
boost::tuples::nil>>>::cons(const boost::tuples::cons<T1_0, T1_1> &)'
'boost::tuples::cons<int, boost::tuples::cons<int, boost::tuples::cons<int,
boost::tuples::nil>>>::cons(const boost::tuples::cons<int,
boost::tuples::cons<int, boost::tuples::cons<int, boost::tuples::nil>>> &)'
(instantiating: 'boost::tuples::tuple<int, int, int, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil>::tuple(const int
&, const int &, const int &, const boost::tuples::nil &, const
boost::tuples::nil &, const boost::tuples::nil &, const boost::tuples::nil
&, const boost::tuples::nil &, const boost::tuples::nil &, const
boost::tuples::nil &)')
tuple_basic.hpp line 398 : inherited(t1, t2, t3, t4, t5, t6, t7,
t8, t9, t10) {}
//=========================================================================
The error is on the closing parenthesis of line 398 of tuple_basic.hpp.
By the way, you don't have to conditionalize on BOOST_NO_STRINGSTREAM if you
stick to always using the crappy std::ostrstream and std::istrstream. I did
that for the iterator test for operators.hpp.
For tuple_test_bench:
//=========================================================================
Error : cannot convert
'no_copy &' to
'no_copy'
(instantiating: 'boost::tuples::tuple<no_copy &, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil>')
tuple_basic.hpp line 398 : inherited(t1, t2, t3, t4, t5, t6, t7,
t8, t9, t10) {}
Error : cannot convert
'char (&)[10]' to
'char *'
(instantiating: 'boost::tuples::tuple<char (&)[10], boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil>')
tuple_basic.hpp line 398 : inherited(t1, t2, t3, t4, t5, t6, t7,
t8, t9, t10) {}
Error : cannot convert
'double &' to
'double'
(instantiating: 'boost::tuples::tuple<double &, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil>')
tuple_basic.hpp line 398 : inherited(t1, t2, t3, t4, t5, t6, t7,
t8, t9, t10) {}
Error : cannot convert
'const double &' to
'const double'
(instantiating: 'boost::tuples::tuple<const double &, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil>')
tuple_basic.hpp line 398 : inherited(t1, t2, t3, t4, t5, t6, t7,
t8, t9, t10) {}
Error : cannot convert
'const A &' to
'const A'
(instantiating: 'boost::tuples::tuple<const A &, B, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil>')
tuple_basic.hpp line 398 : inherited(t1, t2, t3, t4, t5, t6, t7,
t8, t9, t10) {}
Error : cannot convert
'A &' to
'A'
(instantiating: 'boost::tuples::tuple<A &, B, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil>')
tuple_basic.hpp line 398 : inherited(t1, t2, t3, t4, t5, t6, t7,
t8, t9, t10) {}
Error : cannot convert
'A &' to
'A'
(instantiating: 'boost::tuples::tuple<A &, const B &, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil>')
tuple_basic.hpp line 398 : inherited(t1, t2, t3, t4, t5, t6, t7,
t8, t9, t10) {}
Error : cannot convert
'const B &' to
'const B'
(instantiating: 'boost::tuples::tuple<A &, const B &, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil>')
tuple_basic.hpp line 398 : inherited(t1, t2, t3, t4, t5, t6, t7,
t8, t9, t10) {}
Error : function call 'ref(const A)' does not match
'boost::tuples::ref(T0 &)'
tuple_test_bench.cpp line 129 make_tuple(ref(ca));
Error : cannot convert
'double &' to
'double'
(instantiating: 'boost::tuples::tuple<int, double &, const A &,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil>')
tuple_basic.hpp line 398 : inherited(t1, t2, t3, t4, t5, t6, t7,
t8, t9, t10) {}
Error : cannot convert
'double &' to
'double'
(instantiating: 'boost::tuples::tuple<int, double &, const A,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil>')
tuple_basic.hpp line 398 : inherited(t1, t2, t3, t4, t5, t6, t7,
t8, t9, t10) {}
Error : cannot convert
'int &' to
'int'
(instantiating: 'boost::tuples::tuple<int &, char &, double &,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil>')
tuple_basic.hpp line 398 : inherited(t1, t2, t3, t4, t5, t6, t7,
t8, t9, t10) {}
Error : cannot convert
'char &' to
'char'
(instantiating: 'boost::tuples::tuple<int &, char &, double &,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil>')
tuple_basic.hpp line 398 : inherited(t1, t2, t3, t4, t5, t6, t7,
t8, t9, t10) {}
Error : cannot convert
'int &' to
'int'
(instantiating: 'boost::tuples::tuple<int &, int &, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil, boost::tuples::nil, boost::tuples::nil,
boost::tuples::nil>')
tuple_basic.hpp line 398 : inherited(t1, t2, t3, t4, t5, t6, t7,
t8, t9, t10) {}
//=========================================================================
The errors on line 398 were on the colon, the other error on line 129 was on
the first closing parenthesis.
What's the deal with blocking type t7 from Borland?
Also, you could use longer names for your test types and control macros. I
usually have something like "CONTROL_ERROR_1", and I test it by comparing
its Boolean value instead of its #defineness. (I always #define it to be 0
if it's not already #defined.)
Most of the errors could be from your special access_traits class template.
Isn't there something like this already in the Type Traits library? Maybe
switching to that will solve the problem.
-- Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk