220 35049 <1627526.sOtCnR7rdP@tjmaciei-mobl1> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Thiago Macieira <thiago@macieira.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: standard attribute for unions to pun types?
Date: Fri, 20 Oct 2017 09:24:18 -0700
Lines: 25
Approved: news@gmane.org
Message-ID: <1627526.sOtCnR7rdP@tjmaciei-mobl1>
References: <68af543f-b30b-447b-8709-56ccd847735a@isocpp.org> <osce0a$d7l$1@blaine.gmane.org> <CAHSYqdYeWOjRx5weNtSU4p4H9fS6q_pkh_enozWgtcnt5b9Gow@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: blaine.gmane.org 1508516685 30968 195.159.176.226 (20 Oct 2017 16:24:45 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 20 Oct 2017 16:24:45 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRBSOGVDHQKGQEB4UKJ5A@isocpp.org Fri Oct 20 18:24:39 2017
Return-path: <std-proposals+bncBCB4TK757YBRBSOGVDHQKGQEB4UKJ5A@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wm0-f72.google.com ([74.125.82.72])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCB4TK757YBRBSOGVDHQKGQEB4UKJ5A@isocpp.org>)
	id 1e5a6B-0006qa-BU
	for gclcip-std-proposals@m.gmane.org; Fri, 20 Oct 2017 18:24:39 +0200
Original-Received: by mail-wm0-f72.google.com with SMTP id q18sf4978970wmg.18
        for <gclcip-std-proposals@m.gmane.org>; Fri, 20 Oct 2017 09:24:47 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1508516682; cv=pass;
        d=google.com; s=arc-20160816;
        b=kmtrKB/FNDARMl0JQ9PwwCeh1uwiZq1wQy632rKYsJ21UE21CNN1kO8lvr0dzY+Kwp
         4QVTM6o7hk1BLHV/X1hWikMwYEBRz/LCpP8HhpynTzNxdfs8/dW0o59k3xGGYIL3dRvI
         YH7SNZdMwTMnzR7VQmkSqTUjd2m47eksap9r/aAE2jQtiOrBAdDecksKnWNZVc/R8ITI
         Xq+wegmycYUQ7HpIukDU39+KzG+7kVMnYkSUOYhZwxfufYfNUajVGcHcdYi+/C0Oge2K
         WdmZtPcZwRaCYX7aDimXlQmFuxyIsX9FhIoFMqWyR2E9yJCt+lAZUQ5XAl9TNoZBG12V
         QNcg==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:mime-version:references
         :in-reply-to:message-id:date:subject:to:from
         :arc-authentication-results:arc-message-signature:dkim-signature
         :arc-authentication-results;
        bh=PYDMSGQy7/7dBIn24Etky3iZIVLgJrFZpaO1Ndx+Hi4=;
        b=W7QzPMzz8hMjaonnC0/vQ1sz3nnsJhiTFlCxSEe/9IfPFstLOIP0WMRihIWkwdl2+F
         N1RkSZDwXIDawWJvwUNHdBes0xQqJYid5T9J6g4fhmzcpJIPZjye/jZu9//6L616uwGf
         qbj87HLgHLuQtsrI8mqmBq2u3EJ77MlNjG104bkCJhQQ4DEh4386UGGiqk4iie4ywPdN
         /aas6qxRpLEgeVCJSYBvR0ucWfJFwe/IVUyk2YmAf58VdqyoLEy4AQA8rZF7f94od2x8
         ukJv3ASATDHj6pZmc3VvjXCXLWkGAYhjd8j25MZmxKM2RC6wWpsbqNAwf8e8SiTSWEVo
         myHA==
ARC-Authentication-Results: i=2; 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
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:in-reply-to:references:mime-version
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=PYDMSGQy7/7dBIn24Etky3iZIVLgJrFZpaO1Ndx+Hi4=;
        b=zpmlbcfkKHROiTi/Bs3mCTmVLJf69OjFjNALEZnfednh8dczdWHxf4Dhk8DR10RlZd
         At6sM9Glq+roRFchfJMpeJmC59Qi0erDsu8GUpum0V+XyYohBwwLagklQV7Hsw8Uiy/w
         PBWL8WdTd6sV/8VssVPahJ7wQUdvahLNDOcCGwpuVJe5xDnqfLEUHYyesH7u/0NjFFCr
         vDiAd29h4uZmDYBCIMo2YIZxTmcxjwhxWFRjnDutKniYozsrGpCwUUhxiyo3ESsS1JSk
         lsmUWqZRrTvLMtUi3iRKDCpmi27CrkKGOYqVn5YpwOard3Wu+/k9HlZr/vmcLcsvqvF7
         UTnA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to
         :references:mime-version: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=PYDMSGQy7/7dBIn24Etky3iZIVLgJrFZpaO1Ndx+Hi4=;
        b=n7Yc2rONFqcuvWPwDnTR9PpnImrnFDBcsZycCH2Cg26qmrLdac+8311f4xtnKRNrNq
         qiTjT857Ze0OOnPkCR7GkaJrR8niGKw/iibxtm419/E5z+tufDj7UHY54aoztLtKzUfE
         dhRgNu4mjWhdj5pb5o4mtQ71OEAUyvxMbXOMoSjyaDzS7PE82QF/3NU5E8TgRZZqHxWQ
         WI3mX4HSTaDrrkQzOVRFoyqk4IERsnQvFKSsMkDU2+u0YggUMvO+t5rzYhPSOHzh1JaO
         +DGrVzwOUxM9qADopgfVGMuLJti7tCaZ3chexKTCcYynaPse+gMhrH3mFYl4TZ8UlkqQ
         F3Cw==
X-Gm-Message-State: AMCzsaVyhN2xye2KopUo4iUwrDXOaolWVOkWPfhEy/Klwhxl9V4GZkXU
	dhHTwKHymIBXi26qtI6xL9WvIQ==
X-Google-Smtp-Source: ABhQp+Rkht7+CHjCd7bZuM90VOwmW+KIyopUQBMD34en4Uki9kca5L859azBjFjDXUt5KNE8OJbWBw==
X-Received: by 10.223.139.198 with SMTP id w6mr579390wra.4.1508516682058;
        Fri, 20 Oct 2017 09:24:42 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.50.138 with SMTP id y132ls392861wmy.9.gmail; Fri, 20 Oct
 2017 09:24:41 -0700 (PDT)
X-Received: by 10.223.188.67 with SMTP id a3mr2208772wrh.45.1508516680989;
        Fri, 20 Oct 2017 09:24:40 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1508516680; cv=none;
        d=google.com; s=arc-20160816;
        b=C7ltrukt4e7I3H8sIhdMXtrOdsWi5wZwdgNhimsZSX5F/eKD6qizNzqFFkbcr+IfTy
         oipa5RXZtZOjH0K0tCEAcrab3ivowM7rd3fy1AAPawxx32g+eAdexERpssAILlE9P6z/
         m0BMoniwcVXUk4uxgnU/TrLKdcHaD2hNxSJpMnEFclnJ88z/NH7zdvsSm1iWzbrPoLjf
         9x+Fp5aPfucy/zSiRF6OynsQgOp3NgF+bmOR4CoIoXhkfe0joeQo7sjGnmt6CGhhEStP
         zEobqlKLecn5cb6LrVp71zAse+rtMSv7YJOoJSn4sHuf+ZC9A73zvQOuH7PakBlv3pLI
         aw/g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:to:from:arc-authentication-results;
        bh=ZyTg4qIe7dGKQl8/6ohhwYk5jlgbC0Svij7XBE3PPJo=;
        b=doM7/NYQahZGI25Kbem40buCxSinVc5+C6jI9xyx3CQc5ywGG4WugOPZUxulweNC34
         YpJ7qqdlVsZM+eMHRQhIIPhYX5bijogyAPubS8/Oo/ctDHkfe4tGNVu+OXcJcYaDoY6b
         NiNNqUJ/KBAUhIsdUUypNfvVt9qyW/yc9XQ5jEmtE6k0rHitLWMjp2156KATombidHF+
         OI4pT2TRvbCFj8hptjZtaMfUUkiao9T/rmmbgxiqLDArD/quxg7H0tCBSMvtD7+vLJ8m
         Oabp0enuxhusf6rlM+2YoC/0w1/qvYOW/12Islm6YYhYlSsQN5lGKhKcE2S+/XwDDNuQ
         Y+6g==
ARC-Authentication-Results: i=1; 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
Original-Received: from gondolin.macieira.info (gondolin.macieira.info. [78.47.120.188])
        by mx.google.com with ESMTP id b128si1108546wmg.60.2017.10.20.09.24.40
        for <std-proposals@isocpp.org>;
        Fri, 20 Oct 2017 09:24:40 -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 [12.130.127.32])
	by gondolin.macieira.info (Postfix) with ESMTPSA id C440211B4F8
	for <std-proposals@isocpp.org>; Fri, 20 Oct 2017 09:24:39 -0700 (PDT)
In-Reply-To: <CAHSYqdYeWOjRx5weNtSU4p4H9fS6q_pkh_enozWgtcnt5b9Gow@mail.gmail.com>
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-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:35049
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/35049>

On Friday, 20 October 2017 07:23:11 PDT Hyman Rosen wrote:
> On Fri, Oct 20, 2017 at 5:01 AM, Bo Persson <bop@gmb.dk> wrote:
> > If you check the code generated by the popular compilers, you will see
> > that `bit_cast` doesn't really copy anything (despite containing a
> > memcpy).
> > 
> > Returning a value is optimized into a register load from the source.
> > That's it.
> 
> Nevertheless, if I want to, say, set a float to its next representable
> value, I want to do

No, you want to do:
 float_val = std::nextafter(float_val, std::numeric_limits<double>::infinity());

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center

-- 
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/1627526.sOtCnR7rdP%40tjmaciei-mobl1.

.
