[Lemon-devel] [LEMON] #294: ignore_unused_variable_warning

Alpár Jüttner alpar at cs.elte.hu
Thu May 21 07:52:09 CEST 2009


Hi,

> >  The two instances of `ignore_unused_variable_warning()` are in different
> >  namespaces, thus it should not cause conflicts.
> I think this can indeed cause problems because of the "argument dependent name 
> lookup" (see e.g. 
> "http://en.wikipedia.org/wiki/Argument_dependent_name_lookup") which makes the 
> lemon version avaiable to the boost namespace as the given object also comes 
> from the lemon namespace.

You are right. I always forget about this rule.

I has always been amazed how a language like C++ can be such a huge
catalog of stupid design decisions. Amongst all these items this Koenig
lookup is probably the funniest one. This guy (Andrew Koenig) wrote a
book titled C Traps and Pitfalls about "the many ways in which beginners
and even sometimes quite experienced C programmers can write poor,
malfunctioning and dangerous source code." (wikipedia) Then he actively
participated in developing all the anomalies of C++, including this
argument dependent name lookup.

Regards,
Alpar


> For the other errors I habe to apologize, they seem to be purely boost related 
> (I'm currently investigating this)
> 
> greetings, chris
> 
> Am Mittwoch, 20. Mai 2009 12:32:22 schrieb LEMON:
> > #294: ignore_unused_variable_warning
> > ---------------------------+-----------------------------------------------
> >- Reporter:  chrisatlemon  |       Owner:  alpar
> >       Type:  defect        |      Status:  new
> >   Priority:  major         |   Milestone:  LEMON 1.2 release
> >  Component:  core          |     Version:  hg main
> > Resolution:                |    Keywords:
> >   Revision:                |
> > ---------------------------+-----------------------------------------------
> >- Changes (by alpar):
> >
> >   * milestone:  => LEMON 1.2 release
> >
> >
> > Comment:
> >
> >  The two instances of `ignore_unused_variable_warning()` are in different
> >  namespaces, thus it should not cause conflicts.
> >
> >  Are you sure that this is the real root of the problems. For example I can
> >  see other errors preceding the one you refer to, see below.
> >
> >  {{{
> >  g++ testgraph.cpp $(pkg-config --cflags --libs
> >  /home/alpar/projects/LEMON/local/lib/pkgconfig/lemon.pc)
> >  /usr/include/boost/graph/graph_concepts.hpp: In destructor
> >  'boost::concepts::VertexListGraph<G>::~VertexListGraph() [with G =
> >  lemon::ListGraph]':
> >  /usr/include/boost/graph/graph_concepts.hpp:164:   instantiated from
> >  'static void boost::concept::requirement<Model>::failed() [with Model =
> >  boost::concepts::VertexListGraphConcept<lemon::ListGraph>]'
> >  /usr/include/boost/concept_check.hpp:43:   instantiated from 'void
> >  boost::function_requires(Model*) [with Model =
> >  boost::concepts::VertexListGraphConcept<lemon::ListGraph>]'
> >  testgraph.cpp:74:   instantiated from here
> >  /usr/include/boost/graph/graph_concepts.hpp:185: error: no matching
> >  function for call to 'vertices(lemon::ListGraph&)'
> >  /usr/include/boost/graph/graph_concepts.hpp: In member function 'void
> >  boost::concepts::VertexListGraph<G>::const_constraints(const G&) [with G =
> >  lemon::ListGraph]':
> >  /usr/include/boost/graph/graph_concepts.hpp:187:   instantiated from
> >  'boost::concepts::VertexListGraph<G>::~VertexListGraph() [with G =
> >  lemon::ListGraph]'
> >  /usr/include/boost/graph/graph_concepts.hpp:164:   instantiated from
> >  'static void boost::concept::requirement<Model>::failed() [with Model =
> >  boost::concepts::VertexListGraphConcept<lemon::ListGraph>]'
> >  /usr/include/boost/concept_check.hpp:43:   instantiated from 'void
> >  boost::function_requires(Model*) [with Model =
> >  boost::concepts::VertexListGraphConcept<lemon::ListGraph>]'
> >  testgraph.cpp:74:   instantiated from here
> >  /usr/include/boost/graph/graph_concepts.hpp:199: error: no matching
> >  function for call to 'vertices(const lemon::ListGraph&)'
> >  }}}
> 
> _______________________________________________
> Lemon-devel mailing list
> Lemon-devel at lemon.cs.elte.hu
> http://lemon.cs.elte.hu/mailman/listinfo/lemon-devel




More information about the Lemon-devel mailing list