From -2459915607056334785
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,d29d3f379031bbbd,start
X-Google-Attributes: gidf78e5,public
From: Enno Rehling <enno@uni-paderborn.de>
Subject: Re: Why does for_each in STL  use function pointer as paramter?
Date: 1997/01/16
Message-ID: <32DE0593.3BFB@uni-paderborn.de>#1/1
X-Deja-AN: 210253833
references: <MPG.d485d015936bee7989682@news.seed.net.tw>
x-original-date: Thu, 16 Jan 1997 11:40:20 +0100
organization: Universitaet Paderborn, Germany
x-auth: PGPMoose V1.1 PGP comp.std.c++
newsgroups: comp.std.c++
originator: austern@isolde.mti.sgi.com
x-mailer: Mozilla 3.01 (X11; I; SunOS 5.5 sun4m)


angelo wrote:
> 
> As far as I know , all generic algrithms in STL take function objects
> as parameter except "for_each". Why? I think function objects are more
> powerful than function pointers, since you can pass some other
> paramters in the objects' constructors.

for_each, too takes a function onject - there's no such thing as passing
function pointers in the STL, as far as I know. You'd have a strange
implementation if this were so.

Enno

email:	enno@uni-paderborn.de
WWW:	http://pbhrzs0.uni-paderborn.de/~q09960/public/
phone:	Int+ 49 5251-760796
smail:  Kilianstr. 129a
        33098 Paderborn / Germany
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your 
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu 
]



