public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/104542] New: make_obj_using_allocator and uninitialized_construct_using_allocator lack constexpr
@ 2022-02-15  6:36 de34 at live dot cn
  2022-02-15  9:52 ` [Bug libstdc++/104542] " redi at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: de34 at live dot cn @ 2022-02-15  6:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104542

            Bug ID: 104542
           Summary: make_obj_using_allocator and
                    uninitialized_construct_using_allocator lack constexpr
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: de34 at live dot cn
  Target Milestone: ---

std::make_obj_using_allocator and std::uninitialized_construct_using_allocator
are constexpr in C++20 (LWG3185, LWG3321), but currently they are not constexpr
in libstdc++.

I think the related compiler support for std::construct_at is available since
gcc11 (partially available in gcc10), so these functions are reasonably
constexpr in libstdc++ now, and this fix should be backported to gcc 10/11.

wandbox links:

gcc10 with manual constexpr (lacks support for CZ044):
https://wandbox.org/permlink/CvSEindXZa3MMRT5

gcc11&12 with manual constexpr:
https://wandbox.org/permlink/8i7oM16jGxlmz3FC
https://wandbox.org/permlink/VHQJhGINcdpNC0Eh

gcc11&12 with std versions, currently doesn't compile:
https://wandbox.org/permlink/ZUx1xZIOphwxcJhS
https://wandbox.org/permlink/f8uujdEoMUPbsUIq

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libstdc++/104542] make_obj_using_allocator and uninitialized_construct_using_allocator lack constexpr
  2022-02-15  6:36 [Bug libstdc++/104542] New: make_obj_using_allocator and uninitialized_construct_using_allocator lack constexpr de34 at live dot cn
@ 2022-02-15  9:52 ` redi at gcc dot gnu.org
  2022-02-15 14:28 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: redi at gcc dot gnu.org @ 2022-02-15  9:52 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104542

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.3
   Last reconfirmed|                            |2022-02-15
     Ever confirmed|0                           |1
           Assignee|unassigned at gcc dot gnu.org      |redi at gcc dot gnu.org
             Status|UNCONFIRMED                 |ASSIGNED

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libstdc++/104542] make_obj_using_allocator and uninitialized_construct_using_allocator lack constexpr
  2022-02-15  6:36 [Bug libstdc++/104542] New: make_obj_using_allocator and uninitialized_construct_using_allocator lack constexpr de34 at live dot cn
  2022-02-15  9:52 ` [Bug libstdc++/104542] " redi at gcc dot gnu.org
@ 2022-02-15 14:28 ` cvs-commit at gcc dot gnu.org
  2022-04-04 11:46 ` cvs-commit at gcc dot gnu.org
  2022-04-04 21:22 ` redi at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-02-15 14:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104542

--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:

https://gcc.gnu.org/g:6cfb7ffb659fd6b87a21312021ab023a06e8f6be

commit r12-7244-g6cfb7ffb659fd6b87a21312021ab023a06e8f6be
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Feb 15 12:47:39 2022 +0000

    libstdc++: Add missing constexpr to uses-allocator construction utilities
[PR104542]

    libstdc++-v3/ChangeLog:

            PR libstdc++/104542
            * include/bits/uses_allocator_args.h (make_obj_using_allocator)
            (uninitialized_construct_using_allocator): Add constexpr.
            * testsuite/20_util/uses_allocator/make_obj.cc: Check constexpr.
            * testsuite/20_util/uses_allocator/uninitialized_construct.cc: New
test.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libstdc++/104542] make_obj_using_allocator and uninitialized_construct_using_allocator lack constexpr
  2022-02-15  6:36 [Bug libstdc++/104542] New: make_obj_using_allocator and uninitialized_construct_using_allocator lack constexpr de34 at live dot cn
  2022-02-15  9:52 ` [Bug libstdc++/104542] " redi at gcc dot gnu.org
  2022-02-15 14:28 ` cvs-commit at gcc dot gnu.org
@ 2022-04-04 11:46 ` cvs-commit at gcc dot gnu.org
  2022-04-04 21:22 ` redi at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-04-04 11:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104542

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:

https://gcc.gnu.org/g:fe76adc667b4e521705540b30b68ab988c6abbec

commit r11-9760-gfe76adc667b4e521705540b30b68ab988c6abbec
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Feb 15 12:47:39 2022 +0000

    libstdc++: Add missing constexpr to uses-allocator construction utilities
[PR104542]

    libstdc++-v3/ChangeLog:

            PR libstdc++/104542
            * include/bits/uses_allocator_args.h (make_obj_using_allocator)
            (uninitialized_construct_using_allocator): Add constexpr.
            * testsuite/20_util/uses_allocator/make_obj.cc: Check constexpr.
            * testsuite/20_util/uses_allocator/uninitialized_construct.cc: New
test.

    (cherry picked from commit 6cfb7ffb659fd6b87a21312021ab023a06e8f6be)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libstdc++/104542] make_obj_using_allocator and uninitialized_construct_using_allocator lack constexpr
  2022-02-15  6:36 [Bug libstdc++/104542] New: make_obj_using_allocator and uninitialized_construct_using_allocator lack constexpr de34 at live dot cn
                   ` (2 preceding siblings ...)
  2022-04-04 11:46 ` cvs-commit at gcc dot gnu.org
@ 2022-04-04 21:22 ` redi at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: redi at gcc dot gnu.org @ 2022-04-04 21:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104542

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed for 11.3

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-04-04 21:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-15  6:36 [Bug libstdc++/104542] New: make_obj_using_allocator and uninitialized_construct_using_allocator lack constexpr de34 at live dot cn
2022-02-15  9:52 ` [Bug libstdc++/104542] " redi at gcc dot gnu.org
2022-02-15 14:28 ` cvs-commit at gcc dot gnu.org
2022-04-04 11:46 ` cvs-commit at gcc dot gnu.org
2022-04-04 21:22 ` redi at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).