Tomasz Kamiński fcb5cd8e94 libstdc++: Provide helpers to interoperate between __cmp_cat::_Ord and ordering types.
This patch adds two new internal helpers for ordering types:
* __cmp_cat::__ord to retrieve an internal _Ord value,
* __cmp_cat::__make<Ordering> to create an ordering from an _Ord value.

Conversions between ordering types are now handled by __cmp_cat::__make. As a
result, ordering types no longer need to befriend each other, only the new
helpers.

The __fp_weak_ordering implementation has also been simplified by:
* using the new helpers to convert partial_ordering to weak_ordering,
* using strong_ordering to weak_ordering conversion operator,
  for the __isnan_sign comparison,
* removing the unused __cat local variable.

Finally, the _Ncmp enum is removed, and the unordered enumerator is added
to the existing _Ord enum.

libstdc++-v3/ChangeLog:

	* libsupc++/compare (__cmp_cat::_Ord): Add unordered enumerator.
	(__cmp_cat::_Ncmp): Remove.
	(__cmp_cat::__ord, __cmp_cat::__make):  Define.
	(partial_ordering::partial_ordering(__cmp_cat::_Ncmp)): Remove.
	(operator<=>(__cmp_cat::__unspec, partial_ordering))
	(partial_ordering::unordered): Replace _Ncmp with _Ord.
	(std::partial_ordering, std::weak_ordering, std::strong_ordering):
	Befriend __ord and __make helpers, remove friend declartions for
	other orderings.
	(__compare::__fp_weak_ordering): Remove unused __cat variable.
	Simplify ordering conversions.

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
2025-08-28 14:40:48 +02:00
2025-08-11 00:16:52 +00:00
2025-08-18 00:18:52 +00:00
2025-08-16 00:19:12 +00:00
2025-08-17 00:19:17 +00:00
2025-08-01 00:20:20 +00:00
2025-08-16 00:19:12 +00:00
2025-08-22 00:20:38 +00:00
2025-08-21 00:20:43 +00:00
2025-08-07 00:20:46 +00:00
2025-08-07 00:20:46 +00:00
2025-08-06 00:21:26 +00:00
2025-08-17 00:19:17 +00:00
2025-08-01 00:20:20 +00:00
2025-08-22 00:20:38 +00:00

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.
Description
No description provided
Readme 4.2 GiB
Languages
C++ 30.7%
C 30.2%
Ada 14.4%
D 6.1%
Go 5.7%
Other 12.4%