Re: object initialisers

2003-06-24 Thread Austin Hastings
--- Nicholas Clark <[EMAIL PROTECTED]> wrote: > This wasn't quite what I was thinking about. I was more for typing > laziness (and avoiding cut&paste) - I'd like a default for the > instance initialiser, but only to be used (by the compiler's code > generator) if I don't specify a specific initial

Re: object initialisers

2003-06-24 Thread Nicholas Clark
On Thu, Jun 12, 2003 at 04:02:50PM +0200, Rafael Garcia-Suarez wrote: > Nicholas Clark wrote: > > > > class Foo { > > ... > > std::size_t spare = 0 > > std::size_t allocate = 4096 > > std::size_t min_readline = 80 > > > > and have the compiler know that if I specify a member initi

Re: object initialisers

2003-06-12 Thread Rafael Garcia-Suarez
Nicholas Clark wrote: > > class Foo { > ... > std::size_t spare = 0 > std::size_t allocate = 4096 > std::size_t min_readline = 80 > > and have the compiler know that if I specify a member initialiser in my > my constructor, then that should be used, otherwise to default to using >

object initialisers

2003-06-12 Thread Nicholas Clark
IIRC objects are in the future. However, I'm currently writing C++ and keep finding something annoying that I'd like to be able to do easily. I have objects with attributes, such as class Foo { ... std::size_t spare; std::size_t allocate; std::size_t min_readline; and then I have