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=utf8
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 d465fb6c7f57..dd31cff31819 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.0
3.1
3.2
3.3
3.4
4.0
4.1
4.2
4.3
4.4
4.5
4.6
4.7
4.8
4.9
5
5.3
6
7
7.2
7.3
8
9
10
11
12
12.3
13
13.3
14
15
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.0
3.1
3.2
3.3
3.4
4.0
4.1
4.2
4.3
4.4
4.5
4.6
4.7
4.8
4.9
5
5.3
6
7
7.2
7.3
8
9
10
11
12
12.3
13
13.3
14
15
16
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 09afdb3e7033..4441d9cdbae0 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.