Article View: comp.std.c++
Article #2236Re: New Functionality.... Was (Re: Is the STL too authentic...
From: Sean A Corfield
Date: Wed, 18 Oct 1995 13:38
Date: Wed, 18 Oct 1995 13:38
54 lines
2210 bytes
2210 bytes
In article <9510170050.AA42882@cs90slave.csv-tgsc.amex-trs.com>,
jgreen@amex-trs.com wrote:
[anonymous functions]
Yes, I would like these too -- the issue was raised in one of the
Extensions WG sessions but really got no support.
|> Other features I would like to see:
|> -----------------------------------
|>
|> 1: Nested functions.
This has been discussed several times by the Extensions WG and the decision
was taken not to pursue this. I argued in favour of the extension because I
like nested functions but you can't win 'em all.
The closest you'll get is member functions of local classes, I think:
struct interface
{
virtual void function() const = 0;
};
void f(const interface& i)
{
// do stuff with i.function()
}
void g()
{
struct local : public interface
{
void function() const { ... }
};
f(local());
}
|> 2b: An series of overloaded virtual functions with the same name delared
with
|> the variant key word will not be hidden when one or more of the
overload
|> definitions is redeclared.
Something similar can be achieved with the using declaration:
|> class b : public a
|> {
|> virtual foo( long );
using a::foo; // brings in all base class variants
// to overload foo(long)
|> // virtual foo( int ) and foo( double ) are not hidden.
|> }
---
[ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu.
Contact address: std-c++-request@ncar.ucar.edu. The moderation policy
is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID:
<ACAAA14B9668EA26C@158.152.79.67>Path:
arc1-ca.pugleaf.net!in2.uu.net!bounce-backReferences:
<9510170050.AA42882@cs90slave.csv-tgsc.amex-trs.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!in2.uu.net!bounce-back Date: 18 Oct 95 13:38:21 GMT Approved: fjh@cs.mu.oz.au From: Sean A Corfield <sean@corf.demon.co.uk> Newsgroups: comp.std.c++ Subject: Re: New Functionality.... Was (Re: Is the STL too authentic... X-Original-Date: Wed, 18 Oct 1995 12:19:23 +0100 Organization: OCS Message-ID: <ACAAA14B9668EA26C@158.152.79.67> References: <9510170050.AA42882@cs90slave.csv-tgsc.amex-trs.com> X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUBMIUDiOEDnX0m9pzZAQFiZAF/SzQZ1FENO7g39Gv+3Dd7fveuG8HiQBuy Zrv4mSQR+Z8LdT1zZtYpchi7p10f8YVQ =BNiW