Opened 16 years ago

Closed 15 years ago

#899 closed Bugs (None)

Erroneous boost qualification in a global function call

Reported by: efifogel Owned by: Douglas Gregor
Milestone: Component: None
Version: None Severity:
Keywords: Cc:

Description

I believe that I've encountered a bug in the BGL. I'm using version 103200, but I think it hasn't been reported/fixed yet.

File boost/graph/detail/array_binary_tree.hpp, Lines 157 and 158 contain the following statements:

     edata[ boost::get(id, tmp) ]     = i;
     edata[ boost::get(id, value()) ] = x.i;

I think that the qualification should be removed.

The first parameter 'id' in both calls is of type 'ID', which is a template parameter. It could be instantiated with a type defined in a different namespace, say CGAL. The global 'get()' function, which accept the CGAL id
parameter is also defined in CGAL namespace. It must, because other calls to the get() function do not have the qualification, and according to ADL (Koenig Lookup), the function is searched in CGAL namespace. As a consequence the compiler (g++ >= 4.1.0) complains that there is no match, and reports an error.

Efi

Change History (1)

comment:1 by Douglas Gregor, 15 years ago

Status: assignedclosed
Logged In: YES 
user_id=249098
Originator: NO

This has already been fixed; the fix is in Boost 1.34.0 (beta).
Note: See TracTickets for help on using tickets.