From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id EA35B138247 for ; Fri, 20 Dec 2013 12:54:28 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 17F47E0AEE; Fri, 20 Dec 2013 12:54:24 +0000 (UTC) Received: from mail-pb0-f42.google.com (mail-pb0-f42.google.com [209.85.160.42]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1A667E0A90 for ; Fri, 20 Dec 2013 12:54:22 +0000 (UTC) Received: by mail-pb0-f42.google.com with SMTP id uo5so2580463pbc.15 for ; Fri, 20 Dec 2013 04:54:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=UFVlpt+Vd6K3wOostVRF6iN8DIISCbC0XYDrZdixTN8=; b=F78Pzm2bgFzwryGRDfr8uDNhbgbDoCeRegYPqZ9Jnu8IEtRY9yWM2o0TCIx22BENPG +yDAt45TBq42wHeN8jPUj+1HLlllHiRm5Nluuw5HjTy1XRwwDHB2lyxKGF4piRSKJFdk WbeDp4NfTBOSxoY5C6o7sZJQbiF3n43VQCgsAYr8pmStFlWBF8Z4mQCqTPNCcKB6Ui5b P9I3xE2C3dtYBd1XcYljXHi+rrefDdVpomC9QpLfEM1zPDrn2Gvaq2IW/4l5V7a5EsBm BtjZYY/cFM5V27ZvtMQfwUdOtnBjLT812+TliX86ZB/8ZFsFqdc1CO23K06UgjDsMnGs 2oJw== X-Received: by 10.66.163.74 with SMTP id yg10mr8272147pab.57.1387544061844; Fri, 20 Dec 2013 04:54:21 -0800 (PST) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Received: by 10.70.36.175 with HTTP; Fri, 20 Dec 2013 04:54:00 -0800 (PST) In-Reply-To: References: <20131218085447.56d1e133@gentoo.org> <52B309FD.60208@gentoo.org> <1479290.p0qqMGJcP8@sed-notebook> From: Georg Rudoy <0xd34df00d@gmail.com> Date: Fri, 20 Dec 2013 16:54:00 +0400 Message-ID: Subject: Re: [gentoo-dev] How to support C++11 in libraries? To: gentoo-dev@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 962ebcdd-0c52-4805-81c3-22ca5c88fb6f X-Archives-Hash: 538806360f968c4edf05d8b742db5ab9 2013/12/20 Jan Kundr=C3=A1t : > On Friday, 20 December 2013 12:56:43 CEST, Sven Eden wrote: >> >> And no, the languages are _not_ "source-incompatible". That would be a >> scandal! > > > You might argue about this, but that doesn't change these facts. This is > absolutely valid C++98 program: > > jkt@svist ~ $ cat foo.cpp int main() { > auto int foo; > return 0; > } > jkt@svist ~ $ g++ -std=3Dc++98 -pedantic foo.cpp > jkt@svist ~ $ echo $? > 0 > > ...which will *not* build under the C++11 mode: > > jkt@svist ~ $ g++ -std=3Dc++0x foo.cpp > foo.cpp: In function =E2=80=98int main()=E2=80=99: > foo.cpp:2:14: error: two or more data types in declaration of =E2=80=98fo= o=E2=80=99 > > Yes, -Wc++0x-compat warns about this, yes, it's included in -Wall, but it > does not change the fact that there *is* code out there which does confor= m > to C++98 standard, does *not* try to "outsmart the compiler", and which w= ill > not build in the C++11 mode. Do we really have to be having this discussi= on? The C++ Committee considered this exact case in relation to the new meaning of `auto` and decided that such code doesn't really exist in the wild. You won't hit auto-related issues in almost all packages in Portage I guess. There are more obscure cases of incompatibility though, with more obscure error messages, like with autogenerated move ctors and the likes. I've hitted it myself a couple of times in more or less complex template code, but can't think of an example off the top of my head unfortunately. --=20 Georg Rudoy LeechCraft =E2=80=94 http://leechcraft.org