From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gateway22.websitewelcome.com (gateway22.websitewelcome.com [192.185.46.187]) by sourceware.org (Postfix) with ESMTPS id D9DD53848022 for ; Sun, 13 Jun 2021 13:49:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D9DD53848022 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=mad-scientist.net Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=mad-scientist.net Received: from cm13.websitewelcome.com (cm13.websitewelcome.com [100.42.49.6]) by gateway22.websitewelcome.com (Postfix) with ESMTP id 4F64CA92E for ; Sun, 13 Jun 2021 08:49:41 -0500 (CDT) Received: from box5922.bluehost.com ([162.241.30.80]) by cmsmtp with SMTP id sQUflUylyhbxpsQUflFUkI; Sun, 13 Jun 2021 08:49:41 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mad-scientist.us; s=default; h=Content-Transfer-Encoding:MIME-Version: Content-Type:Date:To:Reply-To:From:Subject:Message-ID:Sender:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Kb2VZ+xPykHAbO3aomJoAeP6c8nwPYn/Wz4/kLPx5WI=; b=QOxtJvwfh9/6xDnLOoTyitF7Hy lp9vLa6IqY5o41D/UPwQs/VhESIw1Paxe50loU0JwGwZ6c4KaBs8Scs3UBZ9Jt4d+r0c3s5MMxjT5 AN40+ahXIKHbY88evksAByMIm; Received: from pool-96-233-64-159.bstnma.fios.verizon.net ([96.233.64.159]:58494 helo=pdslaptop.home.arpa) by box5922.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1lsQUe-000eJj-WF for gdb@sourceware.org; Sun, 13 Jun 2021 07:49:41 -0600 Message-ID: Subject: Why does the prettyprint of std::tuple start with [1]? From: Paul Smith Reply-To: paul@mad-scientist.net To: gdb@sourceware.org Date: Sun, 13 Jun 2021 09:49:40 -0400 Organization: Please remain calm--I may be mad but I am a professional! Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5-0ubuntu1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5922.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - mad-scientist.net X-BWhitelist: no X-Source-IP: 96.233.64.159 X-Source-L: No X-Exim-ID: 1lsQUe-000eJj-WF X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: pool-96-233-64-159.bstnma.fios.verizon.net (pdslaptop.home.arpa) [96.233.64.159]:58494 X-Source-Auth: paul@mad-scientist.us X-Email-Count: 1 X-Source-Cap: bWFkc2NpZTE7bWFkc2NpZTE7Ym94NTkyMi5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_NEUTRAL, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jun 2021 13:49:45 -0000 Am I the only one to be confused by the fact that the pretty-printer for std::tuple values starts indexing at 1 instead of 0? (gdb) p info $1 = (const std::tuple &) @0x7fffffffd550: { param = std::tuple containing = { [1] = TestType::OneTest, [2] = DataType::SomeData }, index = 2 } Why aren't the indexes on the left numbered [0] and [1], corresponding to the values used with std::get(), instead of [1] and [2]?