This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [v3 PATCH] PR libstdc++/80675, PR libstdc++/80940
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: Ville Voutilainen <ville dot voutilainen at gmail dot com>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 15 Jun 2017 12:01:59 +0100
- Subject: Re: [v3 PATCH] PR libstdc++/80675, PR libstdc++/80940
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jwakely at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com A6A7D461FE
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A6A7D461FE
- References: <CAFk2RUbEL6_Tvq59baTCSJpqdoiJ3SU3+pWw3pCSzPpa=mTuJA@mail.gmail.com>
On 10/06/17 04:38 +0300, Ville Voutilainen wrote:
- static void __check(...);
+ template<typename _Tp>
+ struct __is_convertible_to_basic_istream
+ : __is_convertible_to_basic_istream_impl<_Tp>
+ {
public:
- using istream_type =
- decltype(__check(declval<typename remove_reference<_Tp>::type*>()));
- using type = __not_<is_same<istream_type, void>>;
+ using type = __not_<is_same<void,
+ typename __is_convertible_to_basic_istream_impl<_Tp>::__istream_type>>;
This could use is_void<...> instead of is_same<void, ...>, same below.
Otherwise OK for trunk, thanks for dealing with this.
80940 is a regression, so we need this on gcc-7-branch too, assuming
it passes testing there.