Boost logo

Boost Users :

From: s_j_turner s_j_turner_at_[hidden])
Date: 2003-01-02 11:38:01


FWIW, I just started looking at Jeremy Siek's concept checking tools,
and my compiler(*) came up with a warning about name hiding which is
trivial to fix.

I was using ContainerConcept, and it uses a method argument with the
same name as a data member. The fix looks like:

*** concept_check.hpp Fri Dec 27 16:51:51 2002
--- concept_check.hpp Thu Jan 2 16:13:03 2003
***************
*** 708,719 ****
        function_requires< AssignableConcept<Container> >();
        const_constraints(c);
      }
! void const_constraints(const Container& c) {
! i = c.begin();
! i = c.end();
! n = c.size();
! n = c.max_size();
! b = c.empty();
      }
      Container c;
      bool b;
--- 708,719 ----
        function_requires< AssignableConcept<Container> >();
        const_constraints(c);
      }
! void const_constraints(const Container& cc) {
! i = cc.begin();
! i = cc.end();
! n = cc.size();
! n = cc.max_size();
! b = cc.empty();
      }
      Container c;
      bool b;

There are a few other classes in there which do the same thing, but
this is the only one I'm currently using.

---
(*) Sun Forte 6.2.1

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