This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/15469] Unable to compile valid code including transform() algorithm: <unknown type> is reported for the forth parameter
- From: "relf at os2 dot ru" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 May 2004 04:26:32 -0000
- Subject: [Bug c++/15469] Unable to compile valid code including transform() algorithm: <unknown type> is reported for the forth parameter
- References: <20040515210135.15469.relf@os2.ru>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From relf at os2 dot ru 2004-05-17 04:26 -------
Wolfgang, could you please explain the difference with the following example
from B.Stroustrup "The C++ Programming Language" 3rd edition, section 18.6.2:
template<class T> T* delete_ptr(T* p) { delete p; return 0; }
void purge(deque<Shape*>& s)
{
transform(s.begin(),s.end(),s.begin(),delete_ptr);
// ...
}
Note that here we pass just `delete_ptr' but not `delete_ptr<Shape>' as the
forth parameter. Why this code does not reqire explicit template class
specification while my code (that is not much different, in fact) does?
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |bangerth at dealii dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15469