Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/2] Add gdb::string_view
Date: Fri, 30 Mar 2018 17:43:00 -0000	[thread overview]
Message-ID: <eb776fb814833b6f309efcb9d0983c39@polymtl.ca> (raw)
In-Reply-To: <8a3ae923-adad-82a4-67bb-8c303511c010@redhat.com>

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<typename... _Tp>
>     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<basic_string_view<_CharT, _Traits>> 
>> __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


      reply	other threads:[~2018-03-30 17:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-17 23:49 [PATCH 1/2] Update ax_cv_cxx_compile_cxx.m4 Simon Marchi
2018-03-17 23:49 ` [PATCH 2/2] Add gdb::string_view Simon Marchi
2018-03-18  0:11   ` Simon Marchi
2018-03-19 12:21     ` Pedro Alves
2018-03-30 17:43       ` Simon Marchi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=eb776fb814833b6f309efcb9d0983c39@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox