This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/2] Add gdb::string_view
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