From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3630 invoked by alias); 23 Mar 2010 15:21:52 -0000 Received: (qmail 3547 invoked by uid 22791); 23 Mar 2010 15:21:51 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00 X-Spam-Check-By: sourceware.org Received: from vsmtp4.tin.it (HELO vsmtp4.tin.it) (212.216.176.224) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 23 Mar 2010 15:21:46 +0000 Received: from [192.168.0.4] (79.25.197.38) by vsmtp4.tin.it (8.5.113) id 4AB26CCC0E6E5F4A; Tue, 23 Mar 2010 16:21:44 +0100 Message-ID: <4BA8DC88.9040605@oracle.com> Date: Tue, 23 Mar 2010 15:58:00 -0000 From: Paolo Carlini User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100228 SUSE/3.0.3-1.1.1 Thunderbird/3.0.3 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" CC: libstdc++ Subject: Re: [v3] Add some type_traits tests References: <4BA8D88F.4050001@oracle.com> In-Reply-To: <4BA8D88F.4050001@oracle.com> Content-Type: multipart/mixed; boundary="------------030101070405090800020704" X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2010-03/txt/msg01066.txt.bz2 This is a multi-part message in MIME format. --------------030101070405090800020704 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-length: 52 ... oh, well. Committed. Paolo. ///////////////// --------------030101070405090800020704 Content-Type: text/plain; name="CL_tests_fu" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="CL_tests_fu" Content-length: 285 2010-03-23 Paolo Carlini * testsuite/util/testsuite_tr1.h (NType, TType, SLType, PODType): Add. * testsuite/20_util/is_trivial/value.cc: Adjust. * testsuite/20_util/is_standard_layout/value.cc: Likewise. * testsuite/20_util/is_pod/value.cc: Likewise. --------------030101070405090800020704 Content-Type: text/plain; name="patch_tests_fu" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="patch_tests_fu" Content-length: 3039 Index: testsuite/util/testsuite_tr1.h =================================================================== --- testsuite/util/testsuite_tr1.h (revision 157670) +++ testsuite/util/testsuite_tr1.h (working copy) @@ -129,6 +129,33 @@ explicit ExplicitClass(int&); }; + struct NType // neither trivial nor standard-layout + { + int i; + int j; + virtual ~NType(); + }; + + struct TType // trivial but not standard-layout + { + int i; + private: + int j; + }; + + struct SLType // standard-layout but not trivial + { + int i; + int j; + ~SLType(); + }; + + struct PODType // both trivial and standard-layout + { + int i; + int j; + }; + int truncate_float(float x) { return (int)x; } long truncate_double(double x) { return (long)x; } Index: testsuite/20_util/is_trivial/value.cc =================================================================== --- testsuite/20_util/is_trivial/value.cc (revision 157671) +++ testsuite/20_util/is_trivial/value.cc (working copy) @@ -22,34 +22,6 @@ #include #include -struct NType // neither trivial nor standard-layout -{ - int i; - int j; - virtual ~NType(); -}; - -struct TType // trivial but not standard-layout -{ - int i; - -private: - int j; -}; - -struct SLType // standard-layout but not trivial -{ - int i; - int j; - ~SLType(); -}; - -struct PODType // both trivial and standard-layout -{ - int i; - int j; -}; - void test01() { bool test __attribute__((unused)) = true; Index: testsuite/20_util/is_pod/value.cc =================================================================== --- testsuite/20_util/is_pod/value.cc (revision 157671) +++ testsuite/20_util/is_pod/value.cc (working copy) @@ -22,34 +22,6 @@ #include #include -struct NType // neither trivial nor standard-layout -{ - int i; - int j; - virtual ~NType(); -}; - -struct TType // trivial but not standard-layout -{ - int i; - -private: - int j; -}; - -struct SLType // standard-layout but not trivial -{ - int i; - int j; - ~SLType(); -}; - -struct PODType // both trivial and standard-layout -{ - int i; - int j; -}; - void test01() { bool test __attribute__((unused)) = true; Index: testsuite/20_util/is_standard_layout/value.cc =================================================================== --- testsuite/20_util/is_standard_layout/value.cc (revision 157671) +++ testsuite/20_util/is_standard_layout/value.cc (working copy) @@ -22,34 +22,6 @@ #include #include -struct NType // neither trivial nor standard-layout -{ - int i; - int j; - virtual ~NType(); -}; - -struct TType // trivial but not standard-layout -{ - int i; - -private: - int j; -}; - -struct SLType // standard-layout but not trivial -{ - int i; - int j; - ~SLType(); -}; - -struct PODType // both trivial and standard-layout -{ - int i; - int j; -}; - void test01() { bool test __attribute__((unused)) = true; --------------030101070405090800020704--