Boost logo

Boost :

Subject: Re: [boost] [Polygon] What does this error mean?
From: Thomas Klimpel (Thomas.Klimpel_at_[hidden])
Date: 2009-09-02 18:30:30


Phil Endecott wrote:
> The code that I'm still unable to compile is at
> http://chezphil.org/tmp/testpoly.cc - if anyone can work out what I've
> done wrong, please let me know!

changing line 192, 193 of the file rectangle_concept.hpp from

    set(lvalue, HORIZONTAL, get(rvalue, HORIZONTAL));
    set(lvalue, VERTICAL, get(rvalue, VERTICAL));

to

    boost::polygon::set(lvalue, HORIZONTAL, get(rvalue, HORIZONTAL));
    boost::polygon::set(lvalue, VERTICAL, get(rvalue, VERTICAL));

solves the problem for me.

I'm no ADL expert (ADL=argument dependent lookup), but I guess the std::pair returned by get for your custom rectangle type pulls in the std namespace, so that the name conflict with std::set occurs. Fully qualifying the calls as I proposed is the correct solution for such ADL problems, IIRC.

Regards,
Thomas


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