Boost logo

Boost :

From: Howard Hinnant (hinnant_at_[hidden])
Date: 2005-05-02 07:31:02


On May 1, 2005, at 5:30 PM, Thorsten Ottosen wrote:

> "Howard Hinnant" <hinnant_at_[hidden]> wrote in message
> news:304705fde50507a9a9bc7dbac2aba447_at_twcny.rr.com...
> | On May 1, 2005, at 4:50 AM, Stefan Slapeta wrote:
> |
> | > # 1034: if (*first1 < *first2)
> | > # Error: ^
> | > # illegal operands 'const animal' < 'const animal'
> |
> | So is a const animal less-than comparable?
>
> no.
>
> but I'm not instantiating any code that uses operator <()
>
> why is this code checked anyway, if not instantiating it?

The error message is saying that

boost::operator >= (ptr_container_detail::reversible_ptr_container< ...
animal...>, ...)

is being instantiated.

If I were to guess, it would be some kind of concepts check.
ptr_container_detail::reversible_ptr_container does derive from
less_than_comparable.

Why is ptr_container_detail::reversible_ptr_container< ... animal...>
getting instantiated?

-Howard


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