Boost logo

Boost :

From: Howard Hinnant (hinnant_at_[hidden])
Date: 2000-06-10 09:35:58


David Abrahams wrote on 6/10/2000 1:07 AM
>CodeWarrior rejected the test because it seems to instantiate unused
>operators. I can't tell whether this is a bug in the compiler or in my code,
>though.

I'm having trouble accessing www.boost.org this morning so I'm not sure I
have an up-to-date test. But the first trouble I'm having with your test
is:

Error : declaration syntax error
reverse_iterator.hpp line 77 Self& operator+=(difference_type n) {

Don't know if this is the error you're referring to or not (pasting in
error messages helps immensely).

The error message looks correct to me. difference_type is undefined.
This error is allowed to be detected even if operator+= is not
instantiated (14.6/7 and 14.6.3/1). Detecting errors as early as
possible in templates is a desired quality (we're still trying to improve
on this ourselves). It is an error because the base class scope is not
examined during name lookup until the class template is instantiated
(14.6.2/3).

If this isn't the error you're having trouble with could you please send
me a complete test and the error message it is causing?

Thanks,
-Howard


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