Boost logo

Boost Users :

From: Martin Pasdzierny (martin_at_[hidden])
Date: 2007-06-14 19:03:38


Hi bringiton,

there is a nice Wikipedia article about 'argument dependent name lookup' AKA
'Koenig-lookup':

http://en.wikipedia.org/wiki/Argument_dependent_name_lookup

I think it generally is a very good idea *not* to use 'using namespace xyz' in
code examples, as long as the (confusing) lookup mechanisms are not the subject
of the example.

Martin.

bringiton bringiton schrieb:
> I've removed the using namespace boost from the astar graph cities
> example. (I prefer to define namespaces explicitly).
>
> //using namespace boost;
>
> I've added boost:: to all the type names and it all compiles fine.
>
> However, some functions compile without the namespace. ie the following line:
>
> WeightMap weightmap = get(boost::edge_weight, g);
>
> Can someone please explain why I dont need a boost:: infront of the get?
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net