Topic: Tiny but embarassing typo in standard
Author: David Byrden <100101.2547@compuserve.com>
Date: 1996/02/23 Raw View
14.3.2.1
template<class T> class Y {
public:
void f1() { g1(1); }
void f2() { g2(2); }
void f3() { g3(3); }
void f4() { g4(4); }
};
void k(const Y<int>& h)
{
void g1(int);
h.f1(); // error: g1(int) called by g1(1) not found
// local g1() not considered
}
Of course, f1() cannot be called in any case because someone forgot to
declare it const.
David
[ To submit articles: Try just posting with your newsreader.
If that fails, use mailto:std-c++@ncar.ucar.edu
FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html
Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html
Comments? mailto:std-c++-request@ncar.ucar.edu
]
Author: ark@research.att.com (Andrew Koenig)
Date: 1996/02/25 Raw View
In article <4girfp$soo@news.bridge.net> David Byrden <100101.2547@compuserve.com> writes:
> Of course, f1() cannot be called in any case because someone forgot to
> declare it const.
Fixed, thank you.
--
--Andrew Koenig
ark@research.att.com
[ To submit articles: Try just posting with your newsreader.
If that fails, use mailto:std-c++@ncar.ucar.edu
FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html
Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html
Comments? mailto:std-c++-request@ncar.ucar.edu
]