public inbox for libstdc++-cvs@sourceware.org help / color / mirror / Atom feed
From: Iain D Sandoe <iains@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc/devel/c++-coroutines] libstdc++: Fix deleted overload of __absu(bool) Date: Mon, 31 Aug 2020 19:49:18 +0000 (GMT) [thread overview] Message-ID: <20200831194918.DF24A3846079@sourceware.org> (raw) https://gcc.gnu.org/g:0789600c597ff1f8ac06e84ffb584c853d1675d1 commit 0789600c597ff1f8ac06e84ffb584c853d1675d1 Author: Jonathan Wakely <jwakely@redhat.com> Date: Sat Aug 29 18:24:08 2020 +0100 libstdc++: Fix deleted overload of __absu(bool) libstdc++-v3/ChangeLog: * include/std/numeric (__detail::__absu(bool)): Make deleted function a function template, so it will be chosen for calls with an explicit template argument list. * testsuite/26_numerics/gcd/gcd_neg.cc: Add dg-prune-output. * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise. Diff: --- libstdc++-v3/include/std/numeric | 2 +- libstdc++-v3/testsuite/26_numerics/gcd/gcd_neg.cc | 1 + libstdc++-v3/testsuite/26_numerics/lcm/lcm_neg.cc | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/include/std/numeric b/libstdc++-v3/include/std/numeric index 8f2ed5c6a5e..bd70a52019b 100644 --- a/libstdc++-v3/include/std/numeric +++ b/libstdc++-v3/include/std/numeric @@ -95,7 +95,7 @@ namespace __detail return __val < 0 ? -(_Up)__val : (_Up)__val; } - void __absu(bool) = delete; + template<typename _Up> void __absu(bool) = delete; // GCD implementation template<typename _Tp> diff --git a/libstdc++-v3/testsuite/26_numerics/gcd/gcd_neg.cc b/libstdc++-v3/testsuite/26_numerics/gcd/gcd_neg.cc index 707148a2670..2e56bc650a7 100644 --- a/libstdc++-v3/testsuite/26_numerics/gcd/gcd_neg.cc +++ b/libstdc++-v3/testsuite/26_numerics/gcd/gcd_neg.cc @@ -50,4 +50,5 @@ test01() // { dg-error "must be integers" "" { target *-*-* } 135 } // { dg-error "must not be bool" "" { target *-*-* } 136 } // { dg-error "must not be bool" "" { target *-*-* } 137 } +// { dg-prune-output "deleted function" } // { dg-prune-output "incomplete type .*make_unsigned" } diff --git a/libstdc++-v3/testsuite/26_numerics/lcm/lcm_neg.cc b/libstdc++-v3/testsuite/26_numerics/lcm/lcm_neg.cc index d4aa6b59da8..9e83fdcae0b 100644 --- a/libstdc++-v3/testsuite/26_numerics/lcm/lcm_neg.cc +++ b/libstdc++-v3/testsuite/26_numerics/lcm/lcm_neg.cc @@ -50,4 +50,5 @@ test01() // { dg-error "must be integers" "" { target *-*-* } 149 } // { dg-error "must not be bool" "" { target *-*-* } 150 } // { dg-error "must not be bool" "" { target *-*-* } 151 } +// { dg-prune-output "deleted function" } // { dg-prune-output "incomplete type .*make_unsigned" }
reply other threads:[~2020-08-31 19:49 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20200831194918.DF24A3846079@sourceware.org \ --to=iains@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@gcc.gnu.org \ /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: linkBe 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; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).