
On May 1, 2005, at 5:30 PM, Thorsten Ottosen wrote:
"Howard Hinnant" <hinnant@twcny.rr.com> wrote in message news:304705fde50507a9a9bc7dbac2aba447@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