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.
This commit is contained in:
parent
cd0233527a
commit
0789600c59
3 changed files with 3 additions and 1 deletions
|
@ -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>
|
||||
|
|
|
@ -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" }
|
||||
|
|
|
@ -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" }
|
||||
|
|
Loading…
Add table
Reference in a new issue