From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id ZZFLGUI7BGH0bAAAWB0awg (envelope-from ) for ; Fri, 30 Jul 2021 13:47:46 -0400 Received: by simark.ca (Postfix, from userid 112) id 574FD1EDFB; Fri, 30 Jul 2021 13:47:46 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id B9A2A1E813 for ; Fri, 30 Jul 2021 13:47:45 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1746D3969836 for ; Fri, 30 Jul 2021 17:47:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1746D3969836 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1627667265; bh=yfdv/TLgW0Y9yj04LEZxjZ8Rkx3HatR1WMz/C4U2xqs=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=oZtumOLKM5OGgO9pJD7D5PsbatSUulJdsfEHsDw0xV5UfscLBv6jxHGKAkWyVXLtj Yn9i5W/9UmmEm8R3MJ+Ocl1EXGsSbmpYupza5K4/y69hDYavG7yF6EJmW4f1lyHWSv HWqOqgZLxM0HUXAXa5XFY3BjbXB0+0jh1Cl2Ekm0= Received: from lndn.lancelotsix.com (lndn.lancelotsix.com [51.195.220.111]) by sourceware.org (Postfix) with ESMTPS id 27FD33953C37 for ; Fri, 30 Jul 2021 17:47:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 27FD33953C37 Received: from ubuntu.lan (unknown [IPv6:2a02:390:9086::635]) by lndn.lancelotsix.com (Postfix) with ESMTPSA id DD3AA818FB; Fri, 30 Jul 2021 17:47:23 +0000 (UTC) Date: Fri, 30 Jul 2021 17:47:19 +0000 To: Simon Marchi Subject: Re: [PATCH 15/16] gdb: make cmd_list_element var an optional union Message-ID: <20210730174719.m5laswgu7ntv5lqx@ubuntu.lan> References: <20210714232112.wsn7pits6uuz3nf5@ubuntu.lan> <20210720230335.dcpfxbol2uwjre3b@Plymouth> <87sfzyci3i.fsf@tromey.com> <20210728204538.z3iqkcfp7yenehms@ubuntu.lan> <87eebhau75.fsf@tromey.com> <20210729201235.h4b7mbvzxu2rnckr@ubuntu.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.11 (lndn.lancelotsix.com [0.0.0.0]); Fri, 30 Jul 2021 17:47:24 +0000 (UTC) X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Lancelot SIX via Gdb-patches Reply-To: Lancelot SIX Cc: Tom Tromey , Lancelot SIX via Gdb-patches Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" > > Would the get_string/set_string/get_int/set_int methods still assert > that the var_type matches the storage type accessed? I think that's > important to have. > > Simon Yes, I’ll maintain that. The thing I’ll drop it the assertion in foo.get() that checks that foo.type is one of [var_a, var_b]. The variadic template will go away, but it is the part that brings the most 'complexity' (i.e. verbose and not necessarily easy to read template code) but only to bring this restrictive assertion. The most important part that will remain are 1) the get/set functions that will help introduce callbacks later and 2) the check that the var_type and the cast are compatible. Lancelot.