@@ -196,10 +196,6 @@ safety annotations.
196
196
replacement scenarios from working, e.g. replacing `operator new ` and
197
197
expecting a non-replaced `operator new[] ` to call the replaced `operator new `.
198
198
199
- **_LIBCPP_DISABLE_NODISCARD_EXT **:
200
- This macro disables library-extensions of ``[[nodiscard]] ``.
201
- See :ref: `Extended Applications of [[nodiscard]] <nodiscard extension >` for more information.
202
-
203
199
**_LIBCPP_DISABLE_DEPRECATION_WARNINGS **:
204
200
This macro disables warnings when using deprecated components. For example,
205
201
using `std::auto_ptr ` when compiling in C++11 mode will normally trigger a
@@ -283,29 +279,6 @@ Libc++ Extensions
283
279
This section documents various extensions provided by libc++, how they're
284
280
provided, and any information regarding how to use them.
285
281
286
- .. _nodiscard extension :
287
-
288
- Extended applications of ``[[nodiscard]] ``
289
- ------------------------------------------
290
-
291
- The ``[[nodiscard]] `` attribute is intended to help users find bugs where
292
- function return values are ignored when they shouldn't be. After C++17 the
293
- C++ standard has started to declared such library functions as ``[[nodiscard]] ``.
294
- However, this application is limited and applies only to dialects after C++17.
295
- Users who want help diagnosing misuses of STL functions may desire a more
296
- liberal application of ``[[nodiscard]] ``.
297
-
298
- For this reason libc++ provides an extension that does just that! The
299
- extension is enabled by default and can be disabled by defining ``_LIBCPP_DISABLE_NODISCARD_EXT ``.
300
- The extended applications of ``[[nodiscard]] `` takes two forms:
301
-
302
- 1. Backporting ``[[nodiscard]] `` to entities declared as such by the
303
- standard in newer dialects, but not in the present one.
304
-
305
- 2. Extended applications of ``[[nodiscard]] ``, at the library's discretion,
306
- applied to entities never declared as such by the standard. You can find
307
- all such applications by grepping for ``_LIBCPP_NODISCARD_EXT ``.
308
-
309
282
Extended integral type support
310
283
------------------------------
311
284
0 commit comments