From patchwork Sun Apr 22 14:39:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 154283 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id E7F02B6FC8 for ; Mon, 23 Apr 2012 00:40:23 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1335710424; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Received:Date:Message-ID:Subject:From:To: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=DPc5WCO 2AS8LUiBOZyxmHO/Kf4Y=; b=cWaPrRgkmV1ZfYJVRhJ0/NzsVK1ab3hkUoQXlIM zHS8cil0OMzBZjkwhnzeU6DYt9M0iQosb0aI5vr5cU7/mW1IGlb35+pz2dfhyejg dWC1JxyJkUV16T1XTbNJFXZJNfCqEFN7+zgfTdEO8uGROdNpsdSX6mncojmxataj /Shc= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:MIME-Version:Received:Received:Date:Message-ID:Subject:From:To:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=PVkfwWG8UFzMoIH1J74J9aFH0+24Hqg9GU+vgJ+Cp+OsJHRxK9iqPDtNszEKCh JQBdYXUQG1+wPNkxVpBNHvqxVnfntJ6CkLe3znWoWPw3/n4fhsPFVutmmMtqqZuy zTAVSik2f/ibBCpCB3K7elkdjGIA2IoTTRRO5OblZMtXw=; Received: (qmail 32695 invoked by alias); 22 Apr 2012 14:40:17 -0000 Received: (qmail 32647 invoked by uid 22791); 22 Apr 2012 14:40:16 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-lpp01m010-f47.google.com (HELO mail-lpp01m010-f47.google.com) (209.85.215.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 22 Apr 2012 14:40:00 +0000 Received: by lagw12 with SMTP id w12so8459538lag.20 for ; Sun, 22 Apr 2012 07:39:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.103.202 with SMTP id fy10mr6226494lbb.43.1335105598955; Sun, 22 Apr 2012 07:39:58 -0700 (PDT) Received: by 10.112.85.98 with HTTP; Sun, 22 Apr 2012 07:39:58 -0700 (PDT) Date: Sun, 22 Apr 2012 15:39:58 +0100 Message-ID: Subject: [v3] add difference_type to __gnu_cxx::__alloc_traits From: Jonathan Wakely To: "libstdc++" , gcc-patches Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org The allocator_traits wrapper is missing difference_type, noticed while making vstring allocator-aware. * include/ext/alloc_traits.h (__alloc_traits::difference_type): Define. Tested x86_64-linux, committed to trunk. commit 7a3e74660df7df20bebb7676cd9142841637ba40 Author: Jonathan Wakely Date: Wed Mar 21 09:40:45 2012 +0000 * include/ext/alloc_traits.h (__alloc_traits::difference_type): Define. diff --git a/libstdc++-v3/include/ext/alloc_traits.h b/libstdc++-v3/include/ext/alloc_traits.h index 4862636..b3e3af6 100644 --- a/libstdc++-v3/include/ext/alloc_traits.h +++ b/libstdc++-v3/include/ext/alloc_traits.h @@ -99,6 +99,7 @@ template typedef typename _Base_type::pointer pointer; typedef typename _Base_type::const_pointer const_pointer; typedef typename _Base_type::size_type size_type; + typedef typename _Base_type::difference_type difference_type; // C++0x allocators do not define reference or const_reference typedef value_type& reference; typedef const value_type& const_reference; @@ -170,6 +171,7 @@ template typedef typename _Alloc::reference reference; typedef typename _Alloc::const_reference const_reference; typedef typename _Alloc::size_type size_type; + typedef typename _Alloc::difference_type difference_type; static pointer allocate(_Alloc& __a, size_type __n)