From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 99533 invoked by alias); 30 Mar 2018 17:43:06 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 99522 invoked by uid 89); 30 Mar 2018 17:43:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=H*f:sk:2018031, our X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 30 Mar 2018 17:43:04 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id w2UHgvDu003418 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 30 Mar 2018 13:43:02 -0400 Received: by simark.ca (Postfix, from userid 112) id 4A2FD1E77E; Fri, 30 Mar 2018 13:42:57 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id A80C41E4B2; Fri, 30 Mar 2018 13:42:55 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 30 Mar 2018 17:43:00 -0000 From: Simon Marchi To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 2/2] Add gdb::string_view In-Reply-To: <8a3ae923-adad-82a4-67bb-8c303511c010@redhat.com> References: <20180317234902.18278-1-simon.marchi@polymtl.ca> <20180317234902.18278-2-simon.marchi@polymtl.ca> <2d68023c-7f24-7eb5-2822-00815b41ba2a@polymtl.ca> <8a3ae923-adad-82a4-67bb-8c303511c010@redhat.com> Message-ID: X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.4 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Fri, 30 Mar 2018 17:42:57 +0000 X-IsSubscribed: yes X-SW-Source: 2018-03/txt/msg00613.txt.bz2 On 2018-03-19 08:21, Pedro Alves wrote: >> Hmm, when building with older g++ (such as the aarch64 builders on the >> buildbot, >> which have g++ 4.8), it trips on: >> >> using __idt = std::common_type_t<_Tp>; >> >> It looks like that release of g++ didn't have std::common_type_t. I >> guess it >> would be possible to avoid using it, and change these: > > It has std::common_type though. C++14 std::foo_t types are usually > just a > helper/convenience alias template, like: > > /// Alias template for common_type > template > using common_type_t = typename common_type<_Tp...>::type; > > So it sounds like we can just use the C++11 / ::type form directly, or > add gdb::common_type_t somewhere, like common/traits.h or to our > copy of string_view. Ok thanks I think I got it to work now. > >> >> operator==(basic_string_view<_CharT, _Traits> __x, >> __detail::__idt> >> __y) noexcept >> >> for >> >> operator==(basic_string_view<_CharT, _Traits> __x, >> basic_string_view<_CharT, _Traits> __y) noexcept >> >> but I am not aware of what consequences it would have. > > Would it be possible to import some of the libstdc++'s relevant > testscases into our unit tests framework, like was done for > gdb::optional [1]? > > [1] https://sourceware.org/ml/gdb-patches/2017-04/msg00239.html Good idea, I did it and it caught a few important compilation issues! I just need to clean up the patches and I'll send a v2. Thanks, Simon