From 6dbcbd96e90159e87a339b98192b7e6e5534b0d7 Mon Sep 17 00:00:00 2001
From: Jonathan Wakely
Date: Mon, 12 May 2025 11:34:01 +0100
Subject: [PATCH] libstdc++: Deprecate non-standard std::fabs(const
complex&) [PR120235]
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
There was an overload of fabs for std::complex in TR1 and in some C++0x
drafts, but it was removed from the working draft by LWG 595.
Since we've been providing it for decades we should deprecate it before
removing it.
libstdc++-v3/ChangeLog:
PR libstdc++/120235
* doc/html/*: Regenerate.
* doc/xml/manual/evolution.xml: Document deprecation.
* include/std/complex: Replace references to TR1 subclauses with
corresponding C++11 subclauses.
(fabs): Add deprecated attribute.
* testsuite/26_numerics/complex/fabs_neg.cc: New test.
Reviewed-by: Tomasz Kamiński
---
libstdc++-v3/doc/html/index.html | 2 +-
libstdc++-v3/doc/html/manual/api.html | 5 ++++-
libstdc++-v3/doc/html/manual/appendix.html | 2 +-
.../doc/html/manual/appendix_porting.html | 2 +-
libstdc++-v3/doc/html/manual/index.html | 2 +-
libstdc++-v3/doc/xml/manual/evolution.xml | 9 +++++++-
libstdc++-v3/include/std/complex | 22 +++++++++----------
.../testsuite/26_numerics/complex/fabs_neg.cc | 13 +++++++++++
8 files changed, 40 insertions(+), 17 deletions(-)
create mode 100644 libstdc++-v3/testsuite/26_numerics/complex/fabs_neg.cc
diff --git a/libstdc++-v3/doc/html/index.html b/libstdc++-v3/doc/html/index.html
index d465fb6c7f5..dd31cff3181 100644
--- a/libstdc++-v3/doc/html/index.html
+++ b/libstdc++-v3/doc/html/index.html
@@ -142,7 +142,7 @@
Existing tests
C++11 Requirements Test Sequence Descriptions
-ABI Policy and Guidelines- The C++ Interface
- Versioning
- Goals
- History
- Prerequisites
- Configuring
- Checking Active
- Allowed Changes
- Prohibited Changes
- Implementation
- Testing
- Single ABI Testing
- Multiple ABI Testing
- Outstanding Issues
API Evolution and Deprecation History3.03.13.23.33.44.04.14.24.34.44.54.64.74.84.955.3
677.27.3
8910111212.31313.31415
Backwards Compatibility- First
- Second
- Third
- Pre-ISO headers removed
- Extension headers hash_map, hash_set moved to ext or backwards
- No
ios::nocreate/ios::noreplace.
+
ABI Policy and Guidelines- The C++ Interface
- Versioning
- Goals
- History
- Prerequisites
- Configuring
- Checking Active
- Allowed Changes
- Prohibited Changes
- Implementation
- Testing
- Single ABI Testing
- Multiple ABI Testing
- Outstanding Issues
API Evolution and Deprecation History3.03.13.23.33.44.04.14.24.34.44.54.64.74.84.955.3
677.27.3
8910111212.31313.3141516
Backwards Compatibility- First
- Second
- Third
- Pre-ISO headers removed
- Extension headers hash_map, hash_set moved to ext or backwards
- No
ios::nocreate/ios::noreplace.
-
No
stream::attach(int fd)
-
diff --git a/libstdc++-v3/doc/html/manual/api.html b/libstdc++-v3/doc/html/manual/api.html
index 09afdb3e703..4441d9cdbae 100644
--- a/libstdc++-v3/doc/html/manual/api.html
+++ b/libstdc++-v3/doc/html/manual/api.html
@@ -490,7 +490,7 @@ to provide the symbols for the experimental C++ Contracts support.
<stacktrace>
header were added to the static library libstdc++exp.a.
-Deprecate the non-standard overload that allows std::setfill
+Deprecated the non-standard overload that allows std::setfill
to be used with std::basic_istream.
The extension allowing std::basic_string to be instantiated
@@ -509,4 +509,7 @@ and removed in C++20:
Nested result_type and argument_type removed from
std::hash specializations for C++20.
+
+Deprecated the non-standard overload of std::fabs for
+std::complex arguments.