From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27583 invoked by alias); 19 Feb 2010 18:56:47 -0000 Received: (qmail 27557 invoked by uid 22791); 19 Feb 2010 18:56:45 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_SORBS_WEB X-Spam-Check-By: sourceware.org Received: from vsmtp3.tin.it (HELO vsmtp3.tin.it) (212.216.176.223) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 19 Feb 2010 18:56:40 +0000 Received: from [192.168.0.4] (79.43.214.202) by vsmtp3.tin.it (8.5.113) id 4B6BECE8012DAE75; Fri, 19 Feb 2010 19:56:37 +0100 Message-ID: <4B7EDEE2.7080209@oracle.com> Date: Fri, 19 Feb 2010 18:56:00 -0000 From: Paolo Carlini User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091130 SUSE/3.0.0-1.1.1 Thunderbird/3.0 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" CC: libstdc++ Subject: [v3] Implement DR 1306 Content-Type: multipart/mixed; boundary="------------020901000101030100020402" 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-02/txt/msg00784.txt.bz2 This is a multi-part message in MIME format. --------------020901000101030100020402 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-length: 78 Hi, tested x86_64-linux, committed to mainline. Paolo. /////////////////// --------------020901000101030100020402 Content-Type: text/plain; name="CL_dr1306" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="CL_dr1306" Content-length: 343 2010-02-19 Paolo Carlini * include/tr1_impl/array (array): Add pointer and const_pointer typedefs in C++0x mode, per DR 1306. * testsuite/util/testsuite_containers.h (basic_types): Add pointer and const_pointer typedefs. (pointer_aware_types): Remove. * testsuite/util/testsuite_container_traits.h: Adjust. --------------020901000101030100020402 Content-Type: text/plain; name="patch_dr1306" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="patch_dr1306" Content-length: 8080 Index: include/tr1_impl/array =================================================================== --- include/tr1_impl/array (revision 156898) +++ include/tr1_impl/array (working copy) @@ -1,6 +1,6 @@ // class template array -*- C++ -*- -// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. +// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -49,6 +49,10 @@ struct array { typedef _Tp value_type; +#ifdef _GLIBCXX_INCLUDE_AS_CXX0X + typedef _Tp* pointer; + typedef const _Tp* const_pointer; +#endif typedef value_type& reference; typedef const value_type& const_reference; typedef value_type* iterator; Index: testsuite/util/testsuite_containers.h =================================================================== --- testsuite/util/testsuite_containers.h (revision 156898) +++ testsuite/util/testsuite_containers.h (working copy) @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2009 Free Software Foundation, Inc. +// Copyright (C) 2009, 2010 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -33,6 +33,8 @@ // Base container requirements (table 80) typedef _Tp test_type; typedef typename test_type::value_type value_type; + typedef typename test_type::pointer pointer; + typedef typename test_type::const_pointer const_pointer; typedef typename test_type::reference reference; typedef typename test_type::const_reference const_reference; typedef typename test_type::iterator iterator; @@ -59,15 +61,6 @@ typedef typename test_type::allocator_type allocator_type; }; - template::is_pointer_aware::value> - struct pointer_aware_types - { - // Allocator-aware requirements (table 82) - typedef _Tp test_type; - typedef typename test_type::pointer pointer; - typedef typename test_type::const_pointer const_pointer; - }; - template::is_associative::value> struct associative_types { @@ -114,15 +107,15 @@ struct basic_types<_Tp, false> { }; template + struct adaptor_types<_Tp, false> { }; + + template struct reversible_types<_Tp, false> { }; template struct allocator_aware_types<_Tp, false> { }; template - struct pointer_aware_types<_Tp, false> { }; - - template struct associative_types<_Tp, false> { }; template @@ -131,15 +124,12 @@ template struct mapped_types<_Tp, false> { }; - template - struct adaptor_types<_Tp, false> { }; - // Primary template. template struct types : basic_types<_Tp>, adaptor_types<_Tp>, reversible_types<_Tp>, - allocator_aware_types<_Tp>, pointer_aware_types<_Tp>, - associative_types<_Tp>, unordered_types<_Tp>, mapped_types<_Tp> + allocator_aware_types<_Tp>, associative_types<_Tp>, + unordered_types<_Tp>, mapped_types<_Tp> { }; Index: testsuite/util/testsuite_container_traits.h =================================================================== --- testsuite/util/testsuite_container_traits.h (revision 156898) +++ testsuite/util/testsuite_container_traits.h (working copy) @@ -34,7 +34,6 @@ typedef std::false_type is_adaptor; typedef std::false_type is_reversible; typedef std::false_type is_allocator_aware; - typedef std::false_type is_pointer_aware; typedef std::false_type is_associative; typedef std::false_type is_unordered; typedef std::false_type is_mapped; @@ -64,7 +63,6 @@ typedef std::true_type is_container; typedef std::true_type is_reversible; typedef std::true_type is_allocator_aware; - typedef std::true_type is_pointer_aware; typedef std::true_type has_erase; typedef std::true_type has_insert; @@ -77,7 +75,6 @@ { typedef std::true_type is_container; typedef std::true_type is_allocator_aware; - typedef std::true_type is_pointer_aware; typedef std::true_type has_erase; typedef std::true_type has_insert; @@ -91,7 +88,6 @@ typedef std::true_type is_container; typedef std::true_type is_reversible; typedef std::true_type is_allocator_aware; - typedef std::true_type is_pointer_aware; typedef std::true_type has_erase; typedef std::true_type has_insert; @@ -105,7 +101,6 @@ typedef std::true_type is_container; typedef std::true_type is_reversible; typedef std::true_type is_allocator_aware; - typedef std::true_type is_pointer_aware; typedef std::true_type has_erase; typedef std::true_type has_insert; @@ -118,7 +113,6 @@ typedef std::true_type is_container; typedef std::true_type is_reversible; typedef std::true_type is_allocator_aware; - typedef std::true_type is_pointer_aware; typedef std::true_type has_erase; typedef std::true_type has_insert; @@ -132,7 +126,6 @@ typedef std::true_type is_container; typedef std::true_type is_reversible; typedef std::true_type is_allocator_aware; - typedef std::true_type is_pointer_aware; typedef std::true_type has_erase; typedef std::true_type has_insert; @@ -144,7 +137,6 @@ typedef std::true_type is_container; typedef std::true_type is_reversible; typedef std::true_type is_allocator_aware; - typedef std::true_type is_pointer_aware; typedef std::true_type is_associative; typedef std::true_type is_mapped; @@ -157,7 +149,6 @@ typedef std::true_type is_container; typedef std::true_type is_reversible; typedef std::true_type is_allocator_aware; - typedef std::true_type is_pointer_aware; typedef std::true_type is_associative; typedef std::true_type is_mapped; @@ -170,7 +161,6 @@ typedef std::true_type is_container; typedef std::true_type is_reversible; typedef std::true_type is_allocator_aware; - typedef std::true_type is_pointer_aware; typedef std::true_type is_associative; typedef std::true_type has_insert; @@ -182,7 +172,6 @@ typedef std::true_type is_container; typedef std::true_type is_reversible; typedef std::true_type is_allocator_aware; - typedef std::true_type is_pointer_aware; typedef std::true_type is_associative; typedef std::true_type has_insert; @@ -213,7 +202,6 @@ { typedef std::true_type is_container; typedef std::true_type is_allocator_aware; - typedef std::true_type is_pointer_aware; typedef std::true_type is_unordered; typedef std::true_type is_mapped; @@ -228,7 +216,6 @@ { typedef std::true_type is_container; typedef std::true_type is_allocator_aware; - typedef std::true_type is_pointer_aware; typedef std::true_type is_unordered; typedef std::true_type is_mapped; @@ -241,7 +228,6 @@ { typedef std::true_type is_container; typedef std::true_type is_allocator_aware; - typedef std::true_type is_pointer_aware; typedef std::true_type is_unordered; typedef std::true_type has_size_type_constructor; @@ -254,7 +240,6 @@ { typedef std::true_type is_container; typedef std::true_type is_allocator_aware; - typedef std::true_type is_pointer_aware; typedef std::true_type is_unordered; typedef std::true_type has_size_type_constructor; --------------020901000101030100020402--