Skip to content
Snippets Groups Projects
Unverified Commit 6ecf2b38 authored by Jonathan Wakely's avatar Jonathan Wakely Committed by Jonathan Wakely
Browse files

libstdc++: Add always_inline to some one-liners in <bits/stl_algobase.h>


We implement std::copy, std::fill etc. as a series of calls to other
overloads which incrementally peel off layers of iterator wrappers. This
adds a high abstraction penalty for -O0 and potentially even -O1. Add
the always_inline attribute to several functions that are just a single
return statement (and maybe a static_assert, or some concept-checking
assertions which are disabled by default).

libstdc++-v3/ChangeLog:

	* include/bits/stl_algobase.h (__copy_move_a1, __copy_move_a)
	(__copy_move_backward_a1, __copy_move_backward_a, move_backward)
	(__fill_a1, __fill_a, fill, __fill_n_a, fill_n, __equal_aux):
	Add always_inline attribute to one-line forwarding functions.

Reviewed-by: default avatarPatrick Palka <ppalka@redhat.com>
parent 5546be4c
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment