|
Boost : |
From: Daryle Walker (darylew_at_[hidden])
Date: 2001-05-06 16:17:41
on 5/5/01 6:30 PM, Douglas Gregor at gregod_at_[hidden] wrote:
> On Friday 04 May 2001 18:45, you wrote:
>> on 5/2/01 8:41 PM, Daryle Walker at darylew_at_[hidden] wrote:
>>> I was trying out the May 1st version of the function trial library at
>>> <http://groups.yahoo.com/group/boost/files/Callback/function-05-01.zip>,
>>> and I got an error from <boost/type_traits/function_traits.hpp>. It was
>>> on line 142, highlighting the word "template." I forgot what the exact
>>> error was; I think it was a syntax error. This is on Metrowerks
>>> CodeWarrior Pro 5.3 for the Mac OS, so it's probably a compiler
>>> deficiency.
>> I worked around the problem by commenting out the "template" qualifiers in
>> the "function_base.hpp", "function.hpp", and "function_traits.hpp"
>> (separate copy) headers. After that, "allocator_test.cpp" and
>> "policy_test.cpp" worked perfectly. The "function_test_fail1.cpp" and
>> "function_test_fail2.cpp" files choked at the right places at compile-time,
>> the comparison and cross-assignment, respectively, with an illegal-operand
>> error. Unfortunately, the "function_test.cpp" file failed. I got a few
>> warnings about missing prototypes, but the main problem was that every (39)
>> cross-assignment failed with an illegal-operand error. Only assignments to
>> objects of the exact same function-wrapper type were accepted.
> Do the numbered function classes exhibit the same behavior? If so, perhaps
> BOOST_NO_DEPENDENT_BASE_LOOKUP would work.
I don't know the library that well, so I don't know what you mean. This is
what I tried:
I did your #define suggestion in function_base.hpp:
//=========================================================================
// Metrowerks CodeWarrior Pro 5.3 does not ...
#ifdef __MWERKS__
# if __MWERKS__ <= 0x2301
# define BOOST_NO_DEPENDENT_BASE_LOOKUP
# endif
#endif
//=========================================================================
The allocator and policy tests continued to work. The first failed example
had a compile-time failure at the expected place, but the second had a
failure at the wrong place:
//=========================================================================
Error : function call does not match prototype
(instantiating: 'boost::detail::function_invoker0<int (*)(float),
int>::invoke(boost::detail::any_pointer, bool)')
function0.hpp line 33 return f();
//=========================================================================
The closing parenthesis was highlighted. The function test fully compiled,
but it (soft) crashed when I ran it. Through debugging, I discovered that
line 514 in function_test.hpp caused an illegal instruction exception
because "sub(10, 2)" called a zero address. For the heck of it, I used your
other #define:
//=========================================================================
// Metrowerks CodeWarrior Pro 5.3 does not ...
#ifdef __MWERKS__
# if __MWERKS__ <= 0x2301
# define BOOST_NO_DEPENDENT_BASE_LOOKUP
# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING
# endif
#endif
//=========================================================================
And the function test worked! The allocator and policy tests continued to
work. The first fail test choked when it was supposed to, but the second
still choked early with the same error given above.
> I won't have any access to CodeWarrior (any version) for the foreseeable
> future, so I'll need help with this if it is ever going to run on CodeWarrior
> 5.3.
Someone else has to do tests on CodeWarrior 6.1. Tests on the Windows OS
family have to be done (I use the Mac OS family).
-- 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