220 9290 <lddv5l$abm$1@ger.gmane.org> article
Path: news.gmane.org!not-for-mail
From: Matthew Woehlke <mw_triad@users.sourceforge.net>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Precise Per-Type Cyclic Garbage Collection (DRAFT 1)
Date: Tue, 11 Feb 2014 14:54:42 -0500
Lines: 43
Approved: news@gmane.org
Message-ID: <lddv5l$abm$1@ger.gmane.org>
References: <d1cac476-349d-4fe9-a0a4-98f8a4378a3a@isocpp.org>	<CAOU91OOUfEMesNzJUgXhHNh16R7nm00yhMrOk_vLamvB+gbQZQ@mail.gmail.com> <CAOUeGfvipKj+AUe9URzbdPB1LTHETgKXb1LMu5ytwHmrfCVcTQ@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
X-Trace: ger.gmane.org 1392148495 11962 80.91.229.3 (11 Feb 2014 19:54:55 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 11 Feb 2014 19:54:55 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCO5FYHBU4ERBFMA5KLQKGQEO65VCQQ@isocpp.org Tue Feb 11 20:55:04 2014
Return-path: <std-proposals+bncBCO5FYHBU4ERBFMA5KLQKGQEO65VCQQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-fa0-f70.google.com ([209.85.161.70])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCO5FYHBU4ERBFMA5KLQKGQEO65VCQQ@isocpp.org>)
	id 1WDJQ7-0007FE-0j
	for gclcip-std-proposals@m.gmane.org; Tue, 11 Feb 2014 20:55:03 +0100
Original-Received: by mail-fa0-f70.google.com with SMTP id x10sf14868322fax.5
        for <gclcip-std-proposals@m.gmane.org>; Tue, 11 Feb 2014 11:55:02 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:to:from:subject:date:lines:message-id:references
         :mime-version:user-agent:in-reply-to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe:content-type;
        bh=a2eTyKQA4yC4x9PUA6R2FCKSne2K/hxClyUnwhjhMSI=;
        b=S5WP16LKpAqNx7mV43/XlW3Bkd7yFu7rdlsgQHDzfhJq/8cJPFFcIR7j7H2FFnMas4
         EiLP+5+91sAstkorQASLqKBqCfqWXt/kMg62uEDzm5ysVVjpSzn0JjoW8xURPaA+JdsU
         3GWtckoZUv9hBbQX25DMra/134xtQG+4fywj4r4dbaW9dKnATjSH9QHvTTAns0kmS2y5
         i2mQXVKowiy2OkvVr6nDMERlwAhBnSyT7LhP8X8Xzc0vOvbKZpBYNpWBWKshWsiUFxnR
         +Ei4hc+KYVy/9BRY2cKKm+9jTUEF8iJZNL92Xr1dLxrsVpeMQxsHbwSDQkn1bwMQzzYn
         5iOg==
X-Gm-Message-State: ALoCoQk//yxat4t/e2RuwYIkYBcdrOZIKurAE8xiky4yXjnbCqIewiYftThD3LxtRns6EfTjeYC+
X-Received: by 10.112.215.3 with SMTP id oe3mr288946lbc.20.1392148502437;
        Tue, 11 Feb 2014 11:55:02 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.152.45.66 with SMTP id k2ls390593lam.11.gmail; Tue, 11 Feb
 2014 11:55:01 -0800 (PST)
X-Received: by 10.112.166.68 with SMTP id ze4mr2517585lbb.58.1392148501186;
        Tue, 11 Feb 2014 11:55:01 -0800 (PST)
Original-Received: from plane.gmane.org (plane.gmane.org. [80.91.229.3])
        by mx.google.com with ESMTPS id l9si10817989lbd.179.2014.02.11.11.55.00
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=RC4-SHA bits=128/128);
        Tue, 11 Feb 2014 11:55:00 -0800 (PST)
Received-SPF: pass (google.com: domain of gclcip-std-proposals@m.gmane.org designates 80.91.229.3 as permitted sender) client-ip=80.91.229.3;
Original-Received: from list by plane.gmane.org with local (Exim 4.69)
	(envelope-from <gclcip-std-proposals@m.gmane.org>)
	id 1WDJPy-0007AY-Lb
	for std-proposals@isocpp.org; Tue, 11 Feb 2014 20:54:54 +0100
Original-Received: from tripoint.kitware.com ([66.194.253.20])
        by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
        id 1AlnuQ-0007hv-00
        for <std-proposals@isocpp.org>; Tue, 11 Feb 2014 20:54:54 +0100
Original-Received: from mw_triad by tripoint.kitware.com with local (Gmexim 0.1 (Debian))
        id 1AlnuQ-0007hv-00
        for <std-proposals@isocpp.org>; Tue, 11 Feb 2014 20:54:54 +0100
X-Injected-Via-Gmane: http://gmane.org/
Original-Lines: 34
Original-X-Complaints-To: usenet@ger.gmane.org
X-Gmane-NNTP-Posting-Host: tripoint.kitware.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0
In-Reply-To: <CAOUeGfvipKj+AUe9URzbdPB1LTHETgKXb1LMu5ytwHmrfCVcTQ@mail.gmail.com>
X-Original-Sender: mw_triad@users.sourceforge.net
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of gclcip-std-proposals@m.gmane.org designates 80.91.229.3 as
 permitted sender) smtp.mail=gclcip-std-proposals@m.gmane.org
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:9290
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/9290>

On 2014-02-11 14:13, xavi wrote:
> My main concern is whether a language extension is really necessary or it
> could be implemented as a library.

I believe there are already libraries in the wild that do this. IIRC, 
VTK (http://vtk.org) is one...

See also http://www.aosabook.org/en/vtk.html and 
http://www.vtk.org/doc/release/5.10/html/classvtkGarbageCollector.html.

> There might be certain things missing in the language:
>     - Being able to forbid automatic storage for certain types.
>     - Having some mechanism so that objects can only be created inside a
> smart pointer. Without inheritance, it's easy, by making the constructors
> private and make_ptr (or something similar) a friend.

These days you probably just want to friend std::make_shared.

> With inheritance things get much more complicated, so the language
> might need to be changed there.

I'm not sure a technical solution to this problem is required. If 
someone wants to shoot themselves in the foot by bypassing a base class 
that is intended to only ever be constructed into a shared_ptr...

>     - Maybe tweak virtual inheritance so that it's possible to inherit from
> two ref-counted classes without significant overhead.

Is this a problem in cases other than non-virtual inheritance from an 
intrusive pointer class? (Do I miss why this would be an issue with 
plain old std::shared_ptr?)

-- 
Matthew

-- 

--- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

.
