Return-Path: Delivered-To: apmail-stdcxx-dev-archive@www.apache.org Received: (qmail 99113 invoked from network); 3 Jul 2008 21:56:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Jul 2008 21:56:55 -0000 Received: (qmail 64957 invoked by uid 500); 3 Jul 2008 21:56:51 -0000 Delivered-To: apmail-stdcxx-dev-archive@stdcxx.apache.org Received: (qmail 64948 invoked by uid 500); 3 Jul 2008 21:56:51 -0000 Mailing-List: contact dev-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list dev@stdcxx.apache.org Received: (qmail 64936 invoked by uid 99); 3 Jul 2008 21:56:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Jul 2008 14:56:51 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [208.30.140.160] (HELO moroha.roguewave.com) (208.30.140.160) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Jul 2008 21:56:00 +0000 Received: from exchmail01.Blue.Roguewave.Com (exchmail01.blue.roguewave.com [10.22.129.22]) by moroha.roguewave.com (8.13.6/8.13.6) with ESMTP id m63LsJIb007374 for ; Thu, 3 Jul 2008 21:54:19 GMT X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: ABI stability of aligned_union et al Date: Thu, 3 Jul 2008 15:53:31 -0600 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: ABI stability of aligned_union et al Thread-Index: AcjX4JEIeVY4WJGeScG1LMiuBwsQwQFdehYg References: <4863CB62.3050305@roguewave.com> <48641F89.80000@roguewave.com> From: "Travis Vitek" To: X-Virus-Checked: Checked by ClamAV on apache.org =20 Martin Sebor wrote: > >Martin Sebor wrote: >> The mangling of std::aligned_union depends on support for variadic >> templates in that specializations of the template will be mangled >> differently depending on whether _RWSTD_NO_VARIADIC_TEMPLATES is >> #defined or not. It seems that it should be possible to assure >> compatible mangling between the two, > >After thinking about it some more I no longer believe this is doable. >With variadic templates the mangled aligned_union will involve only >the names of the types the template is instantiated on. Without them >I don't see any way to emulate this unique behavior. I.e., given >a class template X that takes, say, 2 template arguments, I don't >see a way to prevent the compiler from including the names of both >template arguments in the mangled name for the specialization of >the template on just one argument. The second argument is always >there, even if it's not actually referenced in code. > >So it seems to me that if we provide "workarounds" for the absence >of support for variadic templates in the compiler there will be no >way to migrate from a compiler without the feature to one with it >without breaking the ABI of code that uses templates like >aligned_union or tuple. So, I'll ask again. Should we remove the workarounds for missing variadic template support to avoid any future compatibility issues? This would essentially remove parts of c++0x until the compiler provided the necessary support to do it the right way, but I don't really see that as a bad thing. Travis > >> but I'm not 100% sure, and >> if it is, that it's worth the effort. There might be other >> templates where we may not easily be able to achieve compatibility. >>=20 >> I suppose the big question then is: should we try to fortify the >> implementation against ABI changes caused by changes in the >> techniques used in the implementation of C++ 0x? In the past we >> didn't concern ourselves with this issue but since we can expect >> compilers to only start supporting some of the new core language >> features such as variadic templates only slowly and piecemeal, >> a few at a time, I think it's a concern that we need to address >> early on. >>=20 >> Thoughts? >>=20 >> Martin >>=20 > >