resolving type of params in template member function

Alexandre Oliva oliva@dcc.unicamp.br
Mon Jan 18 01:48:00 GMT 1999


On Jan 18, 1999, joel reed <joelreed@yahoo.com> wrote:

> may i ask why you believe that if egcs has the choice between the
> following to versions of basic_string::end() that it shouldn't try to
> choose the most restrictive of the two? 

> iterator end();
> const_iterator end() const;

If you have a non-const object, the non-const member function will be
selected.  If you have a const object, the const member function
will.  It's that simple.

-- 
Alexandre Oliva  http://www.dcc.unicamp.br/~oliva  aoliva@{acm.org}
oliva@{dcc.unicamp.br,gnu.org,egcs.cygnus.com,samba.org}
Universidade Estadual de Campinas, SP, Brasil




More information about the Gcc-bugs mailing list