Jonathan Wakely f463e6bd8e libstdc++: Add always_inline to ranges iterator ops and access functions
Most of the basis operations for ranges such as ranges::begin and
ranges::next are trivial one-line function bodies, so can be made
always_inline to reduce the abstraction penalty for -O0 code.

Now that we no longer need to support the -fconcepts-ts grammar, we can
also move some [[nodiscard]] attributes to the more natural position
before the function declaration, instead of between the declarator-id
and the function parameters, e.g. we can use:

  template<typename T> requires C<T> [[nodiscard]] auto operator()(T&&)

instead of:

  template<typename T> requires C<T> auto operator() [[nodiscard]] (T&&)

The latter form was necessary because -fconcepts-ts used a different
grammar for the requires-clause, parsing 'C<T>[[x]]' as a subscripting
operator with an ill-formed argument '[x]'. In the C++20 grammar you
would need to use parentheses to use a subscript in a constraint, so
without parentheses it's parsed as an attribute.

libstdc++-v3/ChangeLog:

	* include/bits/ranges_base.h (__detail::__to_unsigned_like)
	(__access::__possible_const_range, __access::__as_const)
	(__distance_fn::operator(), __next_fn::operator())
	(__prev_fn::operator()): Add always_inline attribute.
	(_Begin::operator(), _End::operator(), _RBegin::operator())
	(_REnd::operator(), _Size::operator(), _SSize::operator())
	(_Empty::operator(), _Data::operator(), _SSize::operator()):
	Likewise. Move nodiscard attribute to start of declaration.

Reviewed-by: Tomasz Kamiński <tkaminsk@redhat.com>
2025-09-11 14:38:58 +01:00
2025-09-11 00:20:14 +00:00
2025-08-29 00:19:55 +00:00
2025-09-02 00:19:26 +00:00
2025-08-31 00:18:58 +00:00
2025-09-06 00:20:34 +00:00
2025-09-03 00:20:18 +00:00
2025-09-07 00:20:16 +00:00
2025-09-08 00:20:50 +00:00
2025-09-02 00:19:26 +00:00
2025-09-05 00:19:51 +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.8%
C 30.2%
Ada 14.4%
D 6.1%
Go 5.7%
Other 12.3%