This adds so that other headers don't need to include
all of , which pulls in all of since C++23 (for the
std::print and std::println overloads in ). This new header
allows the constrained operator<< in to be defined
without all of std::format being compiled.
We could also replace with in all
Because basic_ostream::sentry::~sentry is implicitly noexcept, we can't
let any exceptions escape from it, or the program would terminate. If
the streambuf's sync() function throws, or if it returns an error and
setting badbit in the stream state throws, then the program would
terminate.
LWG 835 i
Pushed to wwwdocs.
---
htdocs/gcc-15/porting_to.html | 3 +++
1 file changed, 3 insertions(+)
diff --git a/htdocs/gcc-15/porting_to.html b/htdocs/gcc-15/porting_to.html
index 2bc0d4e5..b9b2efc7 100644
--- a/htdocs/gcc-15/porting_to.html
+++ b/htdocs/gcc-15/porting_to.html
@@ -153,6 +153,9 @@ may
Pushed to wwwdocs.
---
htdocs/gcc-15/porting_to.html | 11 +++
1 file changed, 11 insertions(+)
diff --git a/htdocs/gcc-15/porting_to.html b/htdocs/gcc-15/porting_to.html
index c446e309..2bc0d4e5 100644
--- a/htdocs/gcc-15/porting_to.html
+++ b/htdocs/gcc-15/porting_to.html
@@ -155,6 +15
On Thu, 16 Jan 2025 at 09:50, Jonathan Wakely wrote:
>
> Do not report an error for (is_other(s1) && is_other(s2)) as the
> standard originally said, nor for (is_other(s1) || is_other(s2)) as
> libstdc++ was doing. We can compare inode numbers for special files and
> s
Do not report an error for (is_other(s1) && is_other(s2)) as the
standard originally said, nor for (is_other(s1) || is_other(s2)) as
libstdc++ was doing. We can compare inode numbers for special files and
so give sensible answers.
libstdc++-v3/ChangeLog:
PR libstdc++/118158
* src/
Replace some `__cplusplus > 201402L` preprocessor checks with more
expressive checks for the appropriate feature test macro.
libstdc++-v3/ChangeLog:
* include/bits/stl_map.h: Check __glibcxx_node_extract instead
of __cplusplus.
* include/bits/stl_multimap.h: Likewise.
This test should use __cpp_lib_ios_noreplace rather than the internal
__glibcxx_ios_noreplace macro.
libstdc++-v3/ChangeLog:
* testsuite/27_io/ios_base/types/openmode/case_label.cc: Use
standard feature test macro not internal one.
---
Tested x86_64-linux. Pushed to trunk.
.../
The alloc_ptr.cc test for std::set tries to use C++17 features
unconditionally, and tries to use the C++23 range members which haven't
been implemented for std::set yet.
Some of the range checks are left in place but commented out, so they
can be added after the ranges members are implemented. Oth
libstdc++-v3/ChangeLog:
PR libstdc++/109849
* include/bits/vector.tcc (vector::_M_range_insert): Fix
reversed args in length calculation.
---
Tested x86_64-linux, pushed to trunk. Backport to gcc-14 to follow after
testing.
libstdc++-v3/include/bits/vector.tcc | 2 +-
1
On Mon, 23 Dec 2024 at 01:56, Gerald Pfeifer wrote:
>
> On Wed, 9 Oct 2024, Jonathan Wakely wrote:
> > How about this?
> >
> > +C
> > +
> > +New options -std=c17, to select support for the 2018
> > +edition of the ISO C standard, and -std=g
libstdc++-v3/ChangeLog:
* testsuite/28_regex/traits/char/transform_primary.cc: Fix
subclause numbering in references to the standard.
---
Pushed to trunk.
.../testsuite/28_regex/traits/char/transform_primary.cc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
dif
On Fri, 13 Dec 2024 at 14:01, Jan Hubicka wrote:
>
> Hi,
> this patch improves code generation on string constructors. We currently have
> _M_construct which takes as a parameter two iterators (begin/end pointers to
> other string) and produces new string. This patch adds special case of
> const
On Mon, 30 Dec 2024 at 02:37, Aditya K wrote:
>
> From db5036e40ed7ac43b66ca74c44ec8d0bdc934b07 Mon Sep 17 00:00:00 2001
> From: AdityaK <1108430...@users.noreply.github.com>
> Date: Sun, 29 Dec 2024 18:14:29 -0800
> Subject: [PATCH] libstdc++: Use string::push_back instead of
> string::operator+
On Mon, 13 Jan 2025 at 11:12, Thomas Schwinge wrote:
>
> Hi!
>
> On 2025-01-13T11:04:50+0000, Jonathan Wakely wrote:
> > On Mon, 13 Jan 2025 at 11:03, Thomas Schwinge
> > wrote:
> >> On 2025-01-12T08:38:05+0100, Torbjorn SVENSSON
> >> wrote:
> &g
On Mon, 13 Jan 2025 at 11:03, Thomas Schwinge wrote:
>
> Hi!
>
> On 2025-01-12T08:38:05+0100, Torbjorn SVENSSON
> wrote:
> > On 2025-01-12 01:05, Jonathan Wakely wrote:
> >> On Mon, 23 Dec 2024, 19:05 Torbjörn SVENSSON,
> >> mailto:torbjorn.svens...@fos
On Mon, 23 Dec 2024, 19:05 Torbjörn SVENSSON,
wrote:
> Ok for trunk and releases/gcc-14?
>
OK
> --
>
> Test assumes libatomic.a is always available, but for some embedded
> targets, there is no libatomic.a and the test thus fail.
>
> libstdc++/ChangeLog:
>
> * 29_atomics/atomic_float/
On Sat, 11 Jan 2025, 19:14 Torbjorn SVENSSON,
wrote:
>
>
> On 2025-01-11 20:05, Jonathan Wakely wrote:
> >
> >
> > On Sat, 11 Jan 2025, 18:31 Torbjörn SVENSSON,
> > mailto:torbjorn.svens...@foss.st.com>>
> > wrote:
> >
> > Ok for trun
On Sat, 11 Jan 2025, 18:31 Torbjörn SVENSSON,
wrote:
> Ok for trunk and releases/gcc-14?
>
OK, thanks
> --
>
> When running tests using the "sim" config, the command is launched in
> non-readonly mode and the text retrieved from the expect command will
> then replace all LF with CRLF. (The pr
This is an equality comparison rather than a three-way comparison like
memcmp and <=>, so name it more precisely.
libstdc++-v3/ChangeLog:
* include/bits/atomic_timed_wait.h
(__atomic_wait_address_until_v): Replace __atomic_compare with
__atomic_eq.
(__atomic_wait_a
Also add missing precondition check to constructor and fix existing
check in count_down which was duplicated by mistake.
libstdc++-v3/ChangeLog:
PR libstdc++/98749
* include/std/latch (latch::max()): Use std::cmp_less to handle
the case where __platform_wait_t is wider tha
When using a proxy object for atomic waiting and notifying operations,
we need to ensure that the _M_ver value is always incremented by a
notifying operation, even if we return early without doing the futex
wake syscall. Otherwise we get missed wake-ups because the notifying
thread doesn't modify t
We don't need to wait if we know the counter has reached zero.
libstdc++-v3/ChangeLog:
* include/std/latch (latch::arrive_and_wait): Optimise.
---
This one's commented out for now, but sending for review anyway.
libstdc++-v3/include/std/latch | 12
1 file changed, 12 inser
Making these non-templates will allow them to be moved into the library
at some point.
libstdc++-v3/ChangeLog:
* include/bits/atomic_wait.h (__platform_wait): Change function
template to a normal function. The parameter is always
__platform_wait_t* which is just int* for t
libstdc++-v3/ChangeLog:
* include/bits/atomic_timed_wait.h: Whitespace fixes.
* include/bits/atomic_wait.h: Likewise.
---
libstdc++-v3/include/bits/atomic_timed_wait.h | 198 +-
libstdc++-v3/include/bits/atomic_wait.h | 8 +-
2 files changed, 100 insertions
We can pass around void* instead of casting incompatible pointers to
__platform_wait_t*, and then only static_cast to __platform_wait_t* when
we know that's valid.
libstdc++-v3/ChangeLog:
* include/bits/atomic_timed_wait.h (__atomic_wait_address_until):
Remove reinterpret_cast and
From: Thomas Rodgers
This change splits the __wait_args data members to a new struct
__wait_args_base and then passes that type by const pointer to the low
level implementation functions.
libstdc++-v3/ChangeLog:
* include/bits/atomic_timed_wait.h (__spin_until_impl): Accept
__wa
From: Jonathan Wakely
This series complete Tom's work to refactor the C++20 atomic wait/notify
code. The goal is to make the implementation ready for some pieces to be
moved into libstdc++.so instead of defining everything inline in the
headers.
Also available for review at
From: Thomas Rodgers
This represents a major refactoring of the previous atomic::wait
and atomic::notify implementation detail. The aim of this change
is to simplify the implementation details and position the resulting
implementation so that much of the current header-only detail
can be moved in
Remove the unnecessary __wait_args_base base class, which seems to serve
no purpose. Everywhere it's used we actually want __wait_args instead.
The code using the __wait_flags bitmask type is broken, because the
__spin_only constant includes the __do_spin element. This means that
testing (__args &
This fixes warnings like the following during bootstrap:
sparc-sun-solaris2.11/libstdc++-v3/include/bits/atomic_futex.h:324:53: warning:
unused parameter ‘__mo’ [-Wunused-parameter]
324 | _M_load_when_equal(unsigned __val, memory_order __mo)
|~~
This moves all non-dependent state and logic for std::barrier into a
new non-template base class, to avoid template bloat.
This would permit moving the _M_arrive function into the library instead
of the header.
libstdc++-v3/ChangeLog:
* include/std/barrier (__tree_barrier_base): New clas
On Fri, 10 Jan 2025 at 14:51, Jonathan Wakely wrote:
>
> On Sun, 8 Dec 2024 at 15:36, Jan Hubicka wrote:
> >
> > Hi,
> > std::vector has independent implementation for bool which has its won
> > size/capacity functions. I updated them to add __builtin_unreachabl
On Sun, 8 Dec 2024 at 15:36, Jan Hubicka wrote:
>
> Hi,
> std::vector has independent implementation for bool which has its won
> size/capacity functions. I updated them to add __builtin_unreachable to
> announce that size is never more than max_size. However while testing the
> code
> I notice
On Fri, 27 Dec 2024 at 20:13, Jan Hubicka wrote:
>
> Hi,
> the following testcase:
>
> bool f(const std::vector& v, std::size_t x) {
> return v[x];
> }
>
> is compiled as:
>
> f(std::vector > const&, unsigned long):
> testq %rsi, %rsi
> leaq63(%rsi), %rax
> mo
On Fri, 10 Jan 2025 at 14:32, Tamar Christina wrote:
>
> Hi All,
>
> This is a backport version of the same patch as
> https://gcc.gnu.org/pipermail/gcc-patches/2024-December/671618.html
>
> for the release branches. I'd like to backport this to GCC 14,13 and 12 where
> the first regression showe
The std::barrier constructor should be constexpr, which means we need to
defer the dynamic allocation if the constructor is called during
constant-initialization. We can defer it to the first call to
barrier::arrive, using compare-and-swap on an atomic (instead of the
unique_ptr currently used).
A
libstdc++-v3/ChangeLog:
* include/bits/move.h (__addressof, forward, forward_like, move)
(move_if_noexcept, addressof): Add always_inline attribute.
Replace _GLIBCXX_NODISCARD with [[__nodiscard__]].
---
Tested x86_64-linux. Pushed to trunk.
libstdc++-v3/include/bits/mov
On Thu, 12 Dec 2024 at 00:05, Jonathan Wakely wrote:
>
> Any std::span constructor with a runtime length has a precondition
> that the length is equal to N (except when N == std::dynamic_extent).
>
> Currently every constructor with a runtime length does:
>
>
libstdc++-v3/ChangeLog:
* include/std/span: Fix indentation.
---
Tested x86_64-linux. Pushed to trunk.
libstdc++-v3/include/std/span | 13 ++---
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/libstdc++-v3/include/std/span b/libstdc++-v3/include/std/span
index 4b40
libstdc++-v3/ChangeLog:
PR libstdc++/118260
* python/hook.in: Run 'skip' commands for some simple accessor
functions.
---
Tested x86_64-linux. Pushed to trunk.
libstdc++-v3/python/hook.in | 5 +
1 file changed, 5 insertions(+)
diff --git a/libstdc++-v3/python/hook.i
The std-clib.cc module definition file assumes that all names are
available unconditionally, but that's not true for all targets. Use the
same preprocessor conditions as are present in the headers.
A similar change is needed in std.cc.in for the features that
depend on the SSO std::string, guard
On Wed, 18 Dec 2024 at 21:19, Jonathan Wakely wrote:
>
> std::regex builds a cache of equivalence classes by calling
> std::regex_traits::transform_primary(c) for every char, which then
> calls std::collate::transform which calls strxfrm. On several
> targets strxfrm fail
On Wed, 18 Dec 2024 at 00:40, Jonathan Wakely wrote:
>
> We have several overloads of std::deque::_M_insert_aux, one of which is
> variadic and called by std::deque::emplace. With a suitable set of
> arguments to emplace, it's possible for one of the non-variadic
> _M_insert
On Wed, 18 Dec 2024 at 00:35, Jonathan Wakely wrote:
>
> On Tue, 17 Dec 2024 at 19:38, Jonathan Wakely wrote:
> >
> > On Wed, 31 Jul 2024 at 22:39, Jonathan Wakely wrote:
> > >
> > > On Wed, 24 Jul 2024 at 14:14, William Tsai
> > > wrote:
> >
libstdc++-v3/ChangeLog:
* doc/xml/manual/evolution.xml: Replace invalid
elements with .
* doc/html/*: Regenerate.
---
Pushed to trunk, backports to follow.
libstdc++-v3/doc/html/index.html | 4 ++--
libstdc++-v3/doc/html/manual/api.html | 4 ++--
libstdc++-
Also add "@since C++11" to std::move, std::forward etc.
libstdc++-v3/ChangeLog:
* include/bits/move.h (forward, move, move_if_noexcept, addressof):
Add @since to Doxygen comments.
(forward_like): Add Doxygen comment.
---
Tested x86_64-linux. Pushed to trunk.
libstdc++-v
On Wed, 8 Jan 2025 at 11:00, Jakub Jelinek wrote:
>
> On Wed, Jan 08, 2025 at 11:57:32AM +0100, Giuseppe D'Angelo wrote:
> > On 08/01/2025 11:49, Jakub Jelinek wrote:
> > > > +#ifndef _GLIBCXX26_CONSTEXPR
> > > > +# if __cplusplus >= 202303L
> > > Shouldn't that be 202400L instead? I mean that is
On Sat, 4 Jan 2025 at 20:06, Nicolas Werner wrote:
>
> std::to_underlying was missing from the std module introduced in
> 7db55c0ba1baaf0e323ef7f9ef8c9cda077d40e9. This patch adds the missing
> export for this utility.
>
> There might be more exports missing, but this is the one I found when
> try
On Sun, 29 Dec 2024, 13:55 Gerald Pfeifer wrote:
> I pushed the following for now, though
Thanks!
something tells me this is not the
> full extent of this issue. Something to dig into when I find more time.
>
What's your concern?
I think the explanation for this is simple, and not likely to b
On Sat, 28 Dec 2024, 07:01 Hans-Peter Nilsson, wrote:
> I can't think of a straightforward way to prune these two
> similar tests to a more meaningful subset: there's no easy
> pruning to each Nth iteration instead of every iteration.
> Hopefully exiting the loop after a million runs at the
> beg
On Thu, 26 Dec 2024, 10:03 Jonathan Wakely, wrote:
>
>
> On Wed, 25 Dec 2024, 01:20 Arsen Arsenović, wrote:
>
>> Evening!
>>
>> This patchset includes fixes for two bugs in libstdc++s implementation
>> of std::generator, namely PR118196 and PR118022.
>
On Wed, 25 Dec 2024, 01:20 Arsen Arsenović, wrote:
> Evening!
>
> This patchset includes fixes for two bugs in libstdc++s implementation
> of std::generator, namely PR118196 and PR118022.
>
> There's little to note about these fixes.
>
> Tested on x86_64-pc-linux-gnu via 'make -j17 check' with 's
On Wed, 25 Dec 2024, 01:15 Arsen Arsenović, wrote:
> libstdc++-v3/ChangeLog:
>
> PR libstdc++/118196
> * include/std/generator (generator::operator=(generator)): Add
> missing 'return *this;'.
> *
> testsuite/24_iterators/range_generators/move-assign-missing-return
On Fri, 20 Dec 2024 at 14:21, Giuseppe D'Angelo
wrote:
>
> Hi,
>
> On 20/12/2024 13:37, Jonathan Wakely wrote:
> >
> > With this, I get seven PASS results for this test.
>
> Thank you; I was just thinking, would it be simpler to split the test in
>
On 19/12/24 14:49 +0100, Giuseppe D'Angelo wrote:
diff --git a/libstdc++-v3/testsuite/23_containers/span/init_list_cons_neg.cc
b/libstdc++-v3/testsuite/23_containers/span/init_list_cons_neg.cc
new file mode 100644
index 000..ef43541b769
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_conta
On Thu, 19 Dec 2024 at 13:49, Giuseppe D'Angelo
wrote:
>
> Hello,
>
> On 19/12/2024 13:27, Jonathan Wakely wrote:
> > I was about to push this and realised it's missing a Signed-off-by
> > tag. I assume you meant to contribute this under the DCO terms, as
>
On Thu, 12 Dec 2024 at 14:24, Giuseppe D'Angelo
wrote:
>
> Hi,
>
> On 12/12/2024 01:04, Jonathan Wakely wrote:
> >> I'll prepare a patch to do that,
> > Et voila:
> > https://gcc.gnu.org/pipermail/gcc-patches/2024-December/671432.html
>
> Thanks!
o trunk - thanks for all the work on this!
>
> François
>
>
> On 09/12/2024 07:05, François Dumont wrote:
> >
> > On 04/12/2024 22:48, Jonathan Wakely wrote:
> >> On 04/12/24 19:27 +0100, François Dumont wrote:
> >>> Hi
> >>>
> >&g
std::regex builds a cache of equivalence classes by calling
std::regex_traits::transform_primary(c) for every char, which then
calls std::collate::transform which calls strxfrm. On several
targets strxfrm fails for non-ASCII characters. Because strxfrm has no
return value reserved to indicate an er
On Wed, 18 Dec 2024 at 18:39, François Dumont wrote:
>
> Hi
>
> As proposed on another thread here is the patch to make std::__addressof
> and std::addressof compile time equivalent.
>
> Maybe not entirely because of the [[__nodiscard__]] on std::addressof
> but still closer.
>
> libstdc++: H
On Wed, 18 Dec 2024 at 14:14, Tamar Christina wrote:
>
> > e791e52ec329277474f3218d8a44cd37ded14ac3..8101d868d0c5f7ac4f97931a
> > > ffcf71d826c88094 100644
> > > > --- a/libstdc++-v3/include/bits/hashtable.h
> > > > +++ b/libstdc++-v3/include/bits/hashtable.h
> > > > @@ -2171,7 +2171,7 @@ _GLIBCXX
On Sat, 16 Nov 2024 at 11:20, Luca Bacci wrote:
>
> This is both a performance optimization and a partial fix for
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98723.
>
> This commit fixes the issue for bracket expressions that do not
> depend on the locale's collation facet. Examples:
>
> * Cha
The mapping from char to wchar_t needs to handle 'i' and 'I' but those
were absent from the table that is used for some non-ASCII encodings.
libstdc++-v3/ChangeLog:
* include/bits/basic_string.h (__to_wstring_numeric): Add 'i'
and 'I' to mapping.
---
Tested x86_64-linux.
libstd
We have several overloads of std::deque::_M_insert_aux, one of which is
variadic and called by std::deque::emplace. With a suitable set of
arguments to emplace, it's possible for one of the non-variadic
_M_insert_aux overloads to be selected by overload resolution, making
emplace ill-formed.
Renam
On Tue, 17 Dec 2024 at 19:38, Jonathan Wakely wrote:
>
> On Wed, 31 Jul 2024 at 22:39, Jonathan Wakely wrote:
> >
> > On Wed, 24 Jul 2024 at 14:14, William Tsai wrote:
> > >
> > > The template `future.wait_until` will expand to
> > > `_M
We don't know what state an arbitrary sequence container will be in
after moving from it, so a moved-from std::priority_queue needs to clear
the moved-from container to ensure it doesn't contain elements that are
in an invalid order for the queue. An alternative would be to call
std::make_heap agai
On Wed, 31 Jul 2024 at 22:39, Jonathan Wakely wrote:
>
> On Wed, 24 Jul 2024 at 14:14, William Tsai wrote:
> >
> > The template `future.wait_until` will expand to
> > `_M_load_and_test_until_impl` where it will call
> > `_M_load_and_test_until*` with given tim
libstdc++-v3/ChangeLog:
* include/debug/safe_local_iterator.h (_GLIBCXX_DEBUG_VERIFY_OPERANDS):
Add parentheses to avoid -Wparentheses warning.
---
Tested x86_64-linux. Pushed to trunk.
libstdc++-v3/include/debug/safe_local_iterator.h | 2 +-
1 file changed, 1 insertion(+), 1 de
Inserting an empty range into a std::deque results in undefined calls to
either std::copy, std::copy_backward, std::move, or std::move_backward.
We call those algos with invalid arguments where the output range is the
same as the input range, e.g. std::copy(first, last, first) which
violates the p
On Sat, 14 Dec 2024 at 14:59, Jonathan Wakely wrote:
>
>
>
> On Mon, 9 Dec 2024, 06:05 François Dumont, wrote:
>>
>>
>> On 04/12/2024 22:48, Jonathan Wakely wrote:
>> > On 04/12/24 19:27 +0100, François Dumont wrote:
>> >> Hi
>> >>
&
On Fri, 13 Dec 2024 at 13:45, Jonathan Wakely wrote:
>
> This adds so that other headers don't need to include
> all of , which pulls in all of since C++23 (for the
> std::print and std::println overloads in ). This new header
> allows the constrained operator<< in t
On Mon, 16 Dec 2024 at 14:26, Jonathan Wakely wrote:
>
> I've pushed this patch series now, and I hope I'm done with
> refactoring _Hashtable.
>
> I see about a 2% reduction in memory and in compilation time for an
> explicit instantiation of std::unordered_list when
7;s something, and I find the code easier to understand now.
On Fri, 13 Dec 2024 at 23:07, Jonathan Wakely wrote:
>
> The main change here is using [[no_unique_address]] instead of the Empty
> Base-class Optimization. Using the attribute allows us to use data
> members instead of b
On Mon, 9 Dec 2024, 06:05 François Dumont, wrote:
>
> On 04/12/2024 22:48, Jonathan Wakely wrote:
> > On 04/12/24 19:27 +0100, François Dumont wrote:
> >> Hi
> >>
> >> I've completed the synchronization with your equivalent PR for
> >> std::li
From: Heiko Eißfeldt
gcc/ChangeLog:
* doc/install.texi (Configuration): Fix typos in documentation
for --enable-host-pie.
---
This was reported as https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118041
with a patch attached, but I forgot to put the bug number in the commit.
Pushed
N.B. All libstdc++ patches should be sent to the libstdc++ list (not
just to the names in the MAINTAINERS file).
On Sat, 14 Dec 2024 at 01:01, Jonathan Wakely wrote:
>
> On Fri, 13 Dec 2024 at 17:12, Tamar Christina wrote:
> >
> > Hi All,
> >
> > In GCC 12 ther
On Fri, 13 Dec 2024 at 17:13, Tamar Christina wrote:
>
> Hi All,
>
> We are currently generating a loop which has more comparisons than you'd
> typically need as the probablities on the small size loop are such that it
> assumes the likely case is that an element is not found.
>
> This again gener
On Fri, 13 Dec 2024 at 17:12, Tamar Christina wrote:
>
> Hi All,
>
> In GCC 12 there was a ~40% regression in the performance of hashmap->find.
>
> This regression came about accidentally:
>
> Before GCC 12 the find function was small enough that IPA would inline it even
> though it wasn't marked
Currently the _M_bucket members are left uninitialized for
default-initialized local iterators, and then copy construction copies
indeterminate values. We should just ensure they're initialized on
construction.
Setting them to zero makes default-initialization consistent with
value-initialization
This file is only for C++11 and later, so replace typedefs with
alias-declarations for clarity. Also remove redundant std::
qualification on size_t, ptrdiff_t etc.
We can also remove the result_type, first_argument_type and
second_argument_type typedefs from the range hashers. We don't need
those
The main change here is using [[no_unique_address]] instead of the Empty
Base-class Optimization. Using the attribute allows us to use data
members instead of base-classes. That simplifies the inheritance
hierarchy, which means less work for the compiler. It also means that
ADL has fewer associated
The fix for PR libstdc++/56267 (relating to the lifetime of the hash
object stored in a local iterator) has undefined behaviour, as it relies
on being able to call a member function on an empty object that never
started its lifetime. Although the member function probably doesn't care
about the empt
This adds so that other headers don't need to include
all of , which pulls in all of since C++23 (for the
std::print and std::println overloads in ). This new header
allows the constrained operator<< in to be defined
without all of std::format being compiled.
We could also replace with in all
I noticed a -Wmaybe-uninitialized warning for this function, which turns
out to be correct. If the caller passes a valid std::ios_base::seekdir
value then there's no problem, but if they pass std::seekdir(999) then
we don't initialize the __base variable before adding it to __off.
Rather than init
Although this should never make a difference for sensible code, we
should really make the expression in the noexcept-specifier match the
expression in the function body.
libstdc++-v3/ChangeLog:
* include/bits/ranges_cmp.h (not_equal_to): Make order of
expressions in noexcept-speci
libstdc++-v3/ChangeLog:
* include/bits/regex.tcc: Fix -Wsign-compare warning.
---
Tested x86_64-linux. Pushed to trunk.
libstdc++-v3/include/bits/regex.tcc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libstdc++-v3/include/bits/regex.tcc
b/libstdc++-v3/include/bit
libstdc++-v3/ChangeLog:
* include/pstl/parallel_backend_tbb.h (__merge_func): Fix order
of mem-initializers.
---
Tested x86_64-linux. Pushed to trunk.
There are still lots of -Wunknown-pragmas/-Wsign-compare/-Wunused
warnings in this header though.
libstdc++-v3/include/pstl/par
libstdc++-v3/ChangeLog:
* testsuite/26_numerics/random/random_device/entropy.cc: Fix
indentation to avoid -Wmisleading-indentation warning.
---
Tested x86_64-linux. Pushed to trunk.
.../testsuite/26_numerics/random/random_device/entropy.cc | 2 +-
1 file changed, 1 inserti
libstdc++-v3/ChangeLog:
* testsuite/23_containers/unordered_map/modifiers/reserve.cc:
Cast to size_t to fix -Wsign-compare warning.
* testsuite/23_containers/unordered_set/hash_policy/71181.cc:
Likewise.
* testsuite/23_containers/unordered_set/insert/move_ra
libstdc++-v3/ChangeLog:
* include/bits/hashtable_policy.h (_Local_iterator_base): Fix
-Wsign-compare warnings.
---
Tested x86_64-linux. Pushed to trunk.
libstdc++-v3/include/bits/hashtable_policy.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libstdc++
libstdc++-v3/ChangeLog:
* src/c++17/fs_dir.cc: Fix typo in comment.
---
Pushed as obvious.
libstdc++-v3/src/c++17/fs_dir.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libstdc++-v3/src/c++17/fs_dir.cc b/libstdc++-v3/src/c++17/fs_dir.cc
index 8fe9e5e4cc8..f0529f927
On Thu, 12 Dec 2024 at 14:24, Giuseppe D'Angelo
wrote:
>
> Hi,
>
> On 12/12/2024 01:04, Jonathan Wakely wrote:
> >> I'll prepare a patch to do that,
> > Et voila:
> > https://gcc.gnu.org/pipermail/gcc-patches/2024-December/671432.html
>
> Thanks!
This was approved in Wrocław as LWG 3899.
libstdc++-v3/ChangeLog:
* include/std/generator (generator::yield_value): Add overload
taking lvalue element_of view, as per LWG 3899.
---
The issue suggests that this change avoids creating a new coroutine
frame, so I thought if I used a
On Wed, 11 Dec 2024 at 22:53, Jonathan Wakely wrote:
>
> On 03/12/24 17:05 +0100, Giuseppe D'Angelo wrote:
> >Hello,
> >
> >The attached patch adds the span(initializer_list) constructor, added
> >by P2447R6 for C++26.
> >
> >It seems that GCC is so
Any std::span constructor with a runtime length has a precondition
that the length is equal to N (except when N == std::dynamic_extent).
Currently every constructor with a runtime length does:
if constexpr (extent != dynamic_extent)
__glibcxx_assert(n == extent);
We can move those assertions i
On 03/12/24 17:05 +0100, Giuseppe D'Angelo wrote:
Hello,
The attached patch adds the span(initializer_list) constructor, added
by P2447R6 for C++26.
It seems that GCC is somewhat aggressive with its -Winit-list-lifetime
warning, which actively interferes with this feature. The idea of the
n
On Wed, 11 Dec 2024 at 21:18, Giuseppe D'Angelo
wrote:
>
> On 11/12/2024 21:41, Jonathan Wakely wrote:
> > Hmm, the warning is useful if somebody does:
> >
> > std::span s({1,2,3});
> >
> > So I think we do want the warning, but maybe give it a special
On Tue, 3 Dec 2024 at 16:07, Giuseppe D'Angelo
wrote:
>
> Hello,
>
> The attached patch adds the span(initializer_list) constructor, added by
> P2447R6 for C++26.
>
> It seems that GCC is somewhat aggressive with its -Winit-list-lifetime
> warning, which actively interferes with this feature. The
On Wed, 11 Dec 2024 at 14:59, Arsen Arsenović wrote:
>
> Jonathan Wakely writes:
>
> >> + for (auto _ : gen("const This& argument", std::allocator_arg , &mr))
> >
> > I have no idea what the promise_type::operator new overload that takes
> >
1 - 100 of 1839 matches
Mail list logo