From dev-return-8172-apmail-stdcxx-dev-archive=stdcxx.apache.org@stdcxx.apache.org Thu Jul 10 17:43:44 2008 Return-Path: Delivered-To: apmail-stdcxx-dev-archive@www.apache.org Received: (qmail 88168 invoked from network); 10 Jul 2008 17:43:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Jul 2008 17:43:44 -0000 Received: (qmail 75500 invoked by uid 500); 10 Jul 2008 17:43:38 -0000 Delivered-To: apmail-stdcxx-dev-archive@stdcxx.apache.org Received: (qmail 75477 invoked by uid 500); 10 Jul 2008 17:43:38 -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 75435 invoked by uid 99); 10 Jul 2008 17:43:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Jul 2008 10:43:38 -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, 10 Jul 2008 17:42:46 +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 m6AHf76c007445 for ; Thu, 10 Jul 2008 17:41:08 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: Potential eccp-3.9 bug Date: Thu, 10 Jul 2008 11:41:09 -0600 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Potential eccp-3.9 bug Thread-Index: AcjitCPAnlM5quy7Q/Ol49KRmZSYyw== From: "Travis Vitek" To: X-Virus-Checked: Checked by ClamAV on apache.org I'm porting the traits to the EDG compiler, and I'm running into failures in the test suite. Here is a simple testcase to illustrate... $ cat t.cpp && eccp t.cpp template struct S { }; const bool a =3D __has_trivial_constructor( S<1> ); "t.cpp", line 6: error: an incomplete class type is not allowed const bool a =3D __has_trivial_constructor( S<1> ); ^ "t.cpp", line 6: warning: variable "a" was declared but never referenced const bool a =3D __has_trivial_constructor( S<1> ); ^ 1 error detected in the compilation of "t.cpp". The problem is that the template (S<1> in this case) has not been instantiated, and the compiler chokes trying to use the helper because the type is not 'complete'. It seems like that is a bug and that referring to S<1> here should result in the type being instantiated if the compiler requires it. The problem is that many of the trait tests do this type of thing. I can work around this pretty easily by explicitly instantating each template in each test, but this is tedious (there are many). I was thinking about doing something like this... #define _INSTANTIATE(T) \ typedef typename \ __rw_conditional<__rw_is_class_or_union::value, \ T::type, \ void>::type _RWSTD_PASTE(dummy, __LINE__); And then sneaking a void typedef into each of my user defined types, and then using this macro in the TEST () macro that I use all over the tests. Is there a better way? Travis