220 8900 <lc8u4b$gr4$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: Comments on 2d api for c++ N3888.pdf
Date: Tue, 28 Jan 2014 13:49:59 -0500
Lines: 46
Approved: news@gmane.org
Message-ID: <lc8u4b$gr4$1@ger.gmane.org>
References: <9105f9b2-e15d-4bf8-a4a1-65ebc3657eb0@isocpp.org>	<CAL_=NOqTWD_VD3gMM7sCYvPp3Z2pUNRFrPciE3kmfpSJhLOt1g@mail.gmail.com>	<lc8fnb$gfh$1@ger.gmane.org>	<4305077.qmkjCE1Vbu@tjmaciei-mobl2>	<lc8pbn$j9k$1@ger.gmane.org> <CAFk2RUZxvjC=WSQdYhduDyrg+K6+pW1eSw9OYmcT9_jhw1aWKw@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 1390935014 17613 80.91.229.3 (28 Jan 2014 18:50:14 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 28 Jan 2014 18:50:14 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCO5FYHBU4ERBZPXT6LQKGQEFITIKRY@isocpp.org Tue Jan 28 19:50:18 2014
Return-path: <std-proposals+bncBCO5FYHBU4ERBZPXT6LQKGQEFITIKRY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ea0-f197.google.com ([209.85.215.197])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCO5FYHBU4ERBZPXT6LQKGQEFITIKRY@isocpp.org>)
	id 1W8Dji-0008TS-D0
	for gclcip-std-proposals@m.gmane.org; Tue, 28 Jan 2014 19:50:14 +0100
Original-Received: by mail-ea0-f197.google.com with SMTP id b10sf1618512eae.0
        for <gclcip-std-proposals@m.gmane.org>; Tue, 28 Jan 2014 10:50:14 -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=f0JawmjxcpdRd7V7iqrXD5V1oz7eCzV5pyxPbG2aN1o=;
        b=HODXOjSkNq2KRyCd+NenVnJjpGBz/xObxQdBFXqbSLpz9x/8H8Cq0VLEyUiH+Kfh47
         4Xm7PxaqBgh7JpXHy7O6oe9cv88cCvePq9zdP6PrNsmLnAkulLRqhJOzj9tqANRglfW/
         yaZlCW8LSwaOT6sbpopLJTNI9xya0+SvhMbBbf957wx8H0TqPlH4HOZeFdxic+khjTzz
         faiFeftT/IpQVRVqs8KSqEGg8Mw8NVQcP3F/XDH4rxPfFCvB+XiqQLaEhjBsaLTMp+Rs
         8a9Zh3F9oiVDKbo7h9BvY4yRED26Y349kvRm+8+z6/lxOa50kgld1KY3RSB4C0faArft
         2yIQ==
X-Gm-Message-State: ALoCoQm3JPaBhgy7DYL816fYV7ZjTDdTULEkKverVQizYjdHneJGjl+o/+Gx8ip1XyMmuJHLfZI+
X-Received: by 10.112.160.133 with SMTP id xk5mr1797619lbb.6.1390935013951;
        Tue, 28 Jan 2014 10:50:13 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.152.26.67 with SMTP id j3ls598081lag.3.gmail; Tue, 28 Jan 2014
 10:50:13 -0800 (PST)
X-Received: by 10.113.5.167 with SMTP id cn7mr1824599lbd.1.1390935013008;
        Tue, 28 Jan 2014 10:50:13 -0800 (PST)
Original-Received: from plane.gmane.org (plane.gmane.org. [80.91.229.3])
        by mx.google.com with ESMTPS id m9si7528882lae.0.2014.01.28.10.50.12
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=RC4-SHA bits=128/128);
        Tue, 28 Jan 2014 10:50:12 -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 1W8Djg-0008So-63
	for std-proposals@isocpp.org; Tue, 28 Jan 2014 19:50:12 +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, 28 Jan 2014 19:50:12 +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, 28 Jan 2014 19:50:12 +0100
X-Injected-Via-Gmane: http://gmane.org/
Original-Lines: 37
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: <CAFk2RUZxvjC=WSQdYhduDyrg+K6+pW1eSw9OYmcT9_jhw1aWKw@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:8900
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/8900>

On 2014-01-28 12:50, Ville Voutilainen wrote:
> On 28 January 2014 19:28, Matthew Woehlke
> <mw_triad@users.sourceforge.net> wrote:
>> Also, I wouldn't write native access into the standard except perhaps for
>> some brief wording that implementations may extend the API for that reason.
>> Otherwise you *do* get into standardizing X / WinGDI / DirectX / OpenGL /
>> etc.
>>
>> IOW let the platform vendor "standardize" native access, and only worry
>> about the homogenous API at the language level.
>
> I think it's beneficial to be able to do, in a fairly straightforward
> manner, things like
>
> auto h = foo.native_handle();
> low_level_processing_func(h);

As low_level_processing_func is presumably already conditionally defined 
depending on the platform, why would you not simply pass 'foo' to it 
directly? (What if different implementations have multiple possible 
handles that the user may need? What if an implementation supports 
multiple, runtime-selectable engines with different handle types?)

> #if defined(PLATFORM_X)
> auto h = foo.get_native_handle_for_platform_x();
> #elif defined(PLATFORM_Y)
> yadda yadda yadda
> #endif
> low_level_processing_func(h); // I do hope that the #else branch
> initialized a h...

If it didn't, would you not have also gotten a compile error in the 
above version due to there being no appropriate overload (if there is a 
definition at all) of low_level_processing_func?

-- 
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/.

.
