220 7018 <2005708.rbYZ0ncnaC@tjmaciei-mobl2> article
Path: news.gmane.org!not-for-mail
From: Thiago Macieira <thiago@macieira.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Comments on n3783: Network byte order
Date: Sat, 05 Oct 2013 09:49:25 -0700
Lines: 27
Approved: news@gmane.org
Message-ID: <2005708.rbYZ0ncnaC@tjmaciei-mobl2>
References: <ab789d12-9da0-4d7c-a456-23481262484d@isocpp.org> <93515540-54a8-442e-8314-954583f13600@isocpp.org> <524EB9E1.2070001@gmx.de>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: ger.gmane.org 1380991766 30012 80.91.229.3 (5 Oct 2013 16:49:26 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sat, 5 Oct 2013 16:49:26 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRBGEGYGJAKGQECJSVTQI@isocpp.org Sat Oct 05 18:49:31 2013
Return-path: <std-proposals+bncBCB4TK757YBRBGEGYGJAKGQECJSVTQI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-we0-f200.google.com ([74.125.82.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCB4TK757YBRBGEGYGJAKGQECJSVTQI@isocpp.org>)
	id 1VSV2o-0006ou-HX
	for gclcip-std-proposals@m.gmane.org; Sat, 05 Oct 2013 18:49:30 +0200
Original-Received: by mail-we0-f200.google.com with SMTP id u57sf4432710wes.3
        for <gclcip-std-proposals@m.gmane.org>; Sat, 05 Oct 2013 09:49:29 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=from:to:subject:date:message-id:user-agent: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:content-type;
        bh=Oc8LHBMqmnxApHkxb32OcH1uDL6sJkaDCiMTjLmsziw=;
        b=iGuBRMU7bN2dK+47sco9Sfw3A7WSP7Ns49UmOf0p4JLgVr3RzjSCCakkthGKl4uMDK
         se+ECul0AeuC+hCJ5W+8uVA9c9IeLQVlQ9Kk5A8rrpCx4w8YeZgv//0DppEr1frFuhft
         rAvcidrbQQQ9tREKxL4lOM0gTOU88PQM8xRAObMHvjef+MntSEHQG8FHmMw1WlE5KeKr
         MT0lPbS+ba+kwPVcOrHCXLGRY+uNT1bfzUrsv2JMcj27FV1lpmVQ2/cjRaZFXyfuVO7l
         xeSm6tt6Id8AyOTVDwfDjubB2XyZFd+7+m7SXhxoOkkplsGAM4lgtcW3erY78vlBjCnd
         2aFQ==
X-Received: by 10.180.216.106 with SMTP id op10mr5657256wic.4.1380991768895;
        Sat, 05 Oct 2013 09:49:28 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.180.75.104 with SMTP id b8ls588788wiw.43.gmail; Sat, 05 Oct
 2013 09:49:27 -0700 (PDT)
X-Received: by 10.14.115.133 with SMTP id e5mr32434346eeh.27.1380991767654;
        Sat, 05 Oct 2013 09:49:27 -0700 (PDT)
Original-Received: from gondolin.macieira.info (gondolin.macieira.info. [2a01:4f8:d13:f81:21c:14ff:fe01:12a3])
        by mx.google.com with ESMTP id o7si15589320eep.348.1969.12.31.16.00.00;
        Sat, 05 Oct 2013 09:49:27 -0700 (PDT)
Received-SPF: pass (google.com: domain of thiago@macieira.org designates 2a01:4f8:d13:f81:21c:14ff:fe01:12a3 as permitted sender) client-ip=2a01:4f8:d13:f81:21c:14ff:fe01:12a3;
Original-Received: from tjmaciei-mobl2.localnet (unknown [IPv6:2a01:4f8:d13:f81:21c:14ff:fe01:12a3])
	by gondolin.macieira.info (Postfix) with ESMTPSA id 050E812C002
	for <std-proposals@isocpp.org>; Sat,  5 Oct 2013 09:49:27 -0700 (PDT)
User-Agent: KMail/4.12 pre (Linux/3.9.10-100+i915fix.fc17.x86_64; KDE/4.11.60; x86_64; git-8054221; 2013-08-01)
In-Reply-To: <524EB9E1.2070001@gmx.de>
X-Original-Sender: thiago@macieira.org
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of thiago@macieira.org designates 2a01:4f8:d13:f81:21c:14ff:fe01:12a3
 as permitted sender) smtp.mail=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: <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:7018
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/7018>

On sexta-feira, 4 de outubro de 2013 14:51:45, Markus Mayer wrote:
> > constexpr uint16_t bswap(uint16_t v) {
> >
> >   return __builtin_bswap16(v);
> >
> > }
> 
> I didn't know that __builtin_bswap could be used as a constexpr. Awesome!

Depends on the compiler.

According to comments on the Qt source code, GCC allows it but Clang doesn't.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

-- 

--- 
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/.

.
