Skip to content

Commit 497705f

Browse files
committed
[libc++] Reorganize the documentation of extensions for integral types
1 parent 8d3c960 commit 497705f

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

libcxx/docs/UsingLibcxx.rst

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -424,32 +424,30 @@ which no dialect declares as such (See the second form described above).
424424
* ``to_integer``
425425
* ``to_underlying``
426426

427-
Additional types supported in random distributions
428-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
429-
430-
The `C++ Standard <http://eel.is/c++draft/rand#req.genl-1.5>`_ mentions that instantiating several random number
431-
distributions with types other than ``short``, ``int``, ``long``, ``long long``, and their unsigned versions is
432-
undefined. As an extension, libc++ supports instantiating ``binomial_distribution``, ``discrete_distribution``,
433-
``geometric_distribution``, ``negative_binomial_distribution``, ``poisson_distribution``, and ``uniform_int_distribution``
434-
with ``int8_t``, ``__int128_t`` and their unsigned versions.
435-
436427
Extended integral type support
437428
------------------------------
438429

439-
Several platforms support the 128-bit integral types ``__int128_t`` and
440-
``__uint128_t``. When these types are present they can be used in the headers
441-
as required by the Standard:
430+
Several platforms support types that are not specified in the Standard, such as
431+
the 128-bit integral types ``__int128_t`` and ``__uint128_t``. As an extension,
432+
libc++ does a best-effort attempt to support these types like other integral
433+
types, by supporting them notably in:
442434

443435
* ``<bits>``
444436
* ``<charconv>``
445437
* ``<functional>``
446438
* ``<type_traits>``
447-
448-
As an extension these types can be used in the following headers:
449-
450439
* ``<format>``
451440
* ``<random>``
452441

442+
Additional types supported in random distributions
443+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
444+
445+
The `C++ Standard <http://eel.is/c++draft/rand#req.genl-1.5>`_ mentions that instantiating several random number
446+
distributions with types other than ``short``, ``int``, ``long``, ``long long``, and their unsigned versions is
447+
undefined. As an extension, libc++ supports instantiating ``binomial_distribution``, ``discrete_distribution``,
448+
``geometric_distribution``, ``negative_binomial_distribution``, ``poisson_distribution``, and ``uniform_int_distribution``
449+
with ``int8_t``, ``__int128_t`` and their unsigned versions.
450+
453451
Extensions to ``<format>``
454452
--------------------------
455453

0 commit comments

Comments
 (0)