220 26929 <4948193.1toAHviMXG@tjmaciei-mobl1> article
Path: news.gmane.org!not-for-mail
From: Thiago Macieira <thiago@macieira.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Proposal - non allocating std::function
Date: Wed, 13 Jul 2016 16:22:41 -0700
Lines: 47
Approved: news@gmane.org
Message-ID: <4948193.1toAHviMXG@tjmaciei-mobl1>
References: <e00db911-40f5-4c11-a4b8-32bba77aa0a5@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Trace: ger.gmane.org 1468452175 1981 80.91.229.3 (13 Jul 2016 23:22:55 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 13 Jul 2016 23:22:55 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRBQ42TO6AKGQEQLSSCCY@isocpp.org Thu Jul 14 01:22:45 2016
Return-path: <std-proposals+bncBCB4TK757YBRBQ42TO6AKGQEQLSSCCY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wm0-f72.google.com ([74.125.82.72])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCB4TK757YBRBQ42TO6AKGQEQLSSCCY@isocpp.org>)
	id 1bNTUK-0000Ai-UV
	for gclcip-std-proposals@m.gmane.org; Thu, 14 Jul 2016 01:22:45 +0200
Original-Received: by mail-wm0-f72.google.com with SMTP id o80sf44534963wme.1
        for <gclcip-std-proposals@m.gmane.org>; Wed, 13 Jul 2016 16:22:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=from:to:subject:date:message-id:user-agent:in-reply-to:references
         :mime-version:content-transfer-encoding:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=Gt0qZ1N5SSXaYbMAQPitpSzBFvsrUQJ7qvjOqSlEw6k=;
        b=C15pEaIVhu/MKFpzLfGmMQWSR5M9S3L4Vq9CZOCjrC0+cCA4MHfIIf3R/HibyHz60I
         ur7moVQa7s73lulQ6QIBDFxNXiq65ZAfOoGie0ZevXtVuOlCO/NrFMvkzUdyTbaBRpJr
         lUDYXAHfciiNSW/2tywCgHwwmppyB32h8CCa0aPRuKrFp2+DEIIaHL46tu2a5pXBTvWz
         FVwMVTj7dkNTorZ7cCYeyYAE6ueycuSEwZxuxToveD2M2rk6K3iPme84FMuXm5rAtBm5
         8+w+oLU/SpKvaGqj8tNp2gzHlk+aTWYmovgoXDAvKkk/IIXJdRTz6nbbizDFtDUDs6oM
      
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:to:subject:date:message-id:user-agent
         :in-reply-to:references:mime-version:content-transfer-encoding
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=Gt0qZ1N5SSXaYbMAQPitpSzBFvsrUQJ7qvjOqSlEw6k=;
        b=HXp9+UY986U8kqLMYVEwfzp7N9T29WUN7Dent011X5YRoUsFP+6wqpFjqOX3aIk9HF
         Gq93p0iP532F1K8cciBYLp/oixHc5cOELrjknshBQ1uaG9GlajI2tewJARXanQxWVAsl
         g7lhdit0JMSl3T0bvMyXntwD74l5dy/tHo2b3s+mwmx/mBGbSXUjdBY7gdWV77dG9/kb
         y1pHgKipKqACCHjOqcB7DsId89OdW71eIouSjc1mFULKdCRQl8WsG2epbdFes69wzPm0
         Rm/TQ+MvWZLYXDFWKkQPBScL/toCLM4ZLaaRXfCmuxMf6aDvZhmOiNAWPN7XepUXJy9v
  
X-Gm-Message-State: ALyK8tKlZQdaEMYa5xkjf8fxEuZxC9qVJaHWF4sI4Rb5/eZ2TA4tSWIrh/yjbSgAgjSFFg==
X-Received: by 10.46.32.69 with SMTP id g66mr1888507ljg.8.1468452164415;
        Wed, 13 Jul 2016 16:22:44 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.210.208 with SMTP id j199ls65200wmg.14.gmail; Wed, 13 Jul
 2016 16:22:43 -0700 (PDT)
X-Received: by 10.28.54.229 with SMTP id y98mr26672108wmh.96.1468452163477;
        Wed, 13 Jul 2016 16:22:43 -0700 (PDT)
Original-Received: from gondolin.macieira.info (gondolin.macieira.info. [78.47.120.188])
        by mx.google.com with ESMTP id ep12si3361947wjd.71.2016.07.13.16.22.43
        for <std-proposals@isocpp.org>;
        Wed, 13 Jul 2016 16:22:43 -0700 (PDT)
Received-SPF: pass (google.com: domain of thiago@macieira.org designates 78.47.120.188 as permitted sender) client-ip=78.47.120.188;
Original-Received: from tjmaciei-mobl1.localnet (unknown [134.134.139.77])
	by gondolin.macieira.info (Postfix) with ESMTPSA id 2306111A67C
	for <std-proposals@isocpp.org>; Wed, 13 Jul 2016 16:22:43 -0700 (PDT)
User-Agent: KMail/5.2.2 (Linux/4.6.3-1-default; KDE/5.23.0; x86_64; ; )
In-Reply-To: <e00db911-40f5-4c11-a4b8-32bba77aa0a5@isocpp.org>
X-Original-Sender: thiago@macieira.org
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of thiago@macieira.org designates 78.47.120.188 as permitted sender) smtp.mailfrom=thiago@macieira.org
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: std-proposals@isocpp.org
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:26929
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/26929>

Em quarta-feira, 13 de julho de 2016, =C3=A0s 15:47:44 PDT, Carl Cook escre=
veu:
> Hi all,
>=20
> This is a cross posting from the SG14 reflector, regarding a draft propos=
al
> some of us are working on.
>=20
> Very briefly, some of us are interested in having a standardized function
> which does not incur an upfront memory allocation to store the callable
> target, instead opting for a compile time specified buffer (stack
> allocated). This has been quite useful in several low latency domains suc=
h
> as gaming and electronic trading. In other words, a drop-in replacement f=
or
> std::function, where all data is on the stack.
>=20
> The original post is
> here:
> https://groups.google.com/a/isocpp.org/d/topic/sg14/1Sw_qEdIYes/discussio=
n
>=20
> The resultant draft proposal is
> here:
> https://github.com/WG21-SG14/SG14/blob/master/Docs/Proposals/NonAllocatin=
gS
> tandardFunction.pdf

Hi Carl

Can you explain somewhere why std::function is unable to do that?

In other words, why must std::function allocate memory?

--=20
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center

--=20
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 e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/4948193.1toAHviMXG%40tjmaciei-mobl1.

.
