Boost logo

Boost :

From: Daryle Walker (darylew_at_[hidden])
Date: 2001-06-03 22:58:45


on 6/3/01 7:39 PM, David Abrahams at abrahams_at_[hidden] wrote:

> ...and it would be worth describing what "Ron's member idiom" is supposed to
> mean.

The idiom is explained in the HTML documentation that comes with the
archive. To summarize: C++ enforces an initialization order that has a
class's members get initialized after the class's base-class parts. This
prevents (generally) defined behavior from initializing a base-class with a
member. The idiom gets around the problem by converting the member to
another base-class, inserted into the main class's hierarchy so the idiom
class gets initialized before the other base class that needs it.

I ripped this idea from Dietmar Kuehl's files and his posts to C++
newsgroups. (I haven't contacted the originator, Ron Klatcho, myself.) I
guess that Dietmar, or Ron, could explain it better. Dietmar customized his
uses, I put it in a general library form. This is what necessitated my new
contribution to this concept, the UniqueID. The ID workaround the fact that
a class can't be a (direct) base more than once, due to bases not being
named. A differing number in the ID template field makes a (technically)
different class.

> ----- Original Message -----
> From: "Beman Dawes" <bdawes_at_[hidden]>
> To: <boost_at_[hidden]>; "Boost" <boost_at_[hidden]>
> Sent: Sunday, June 03, 2001 7:16 PM
> Subject: Re: [boost] Checking out dlw_util.zip?
>
>
>> At 06:47 PM 6/3/2001, Daryle Walker wrote:
>>
>>> Who is in charge of the utility library? I was wondering if they would look
>>> at the proposed addition in the "dlw_util.zip" archive (at version 4) in the
>>> vault. The additions are helper classes for using Ron's member idiom.
>>>
>>> Their use is fairly straightforward, the test file is far more complicated
>>> than what's being tested (since we're timing object creation/destruction)!
>>
>> I guess Dave Abrahams and I are the utility library maintainers.
>>
>> But how about asking the list as a whole for options? I'm backed up with
>> requests to look at stuff, I'm afraid.

-- 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk