Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

P2264 R7 Make assert() macro user friendly for C and C++ #957

Closed
wg21bot opened this issue Dec 27, 2020 · 27 comments · Fixed by cplusplus/draft#6701
Closed

P2264 R7 Make assert() macro user friendly for C and C++ #957

wg21bot opened this issue Dec 27, 2020 · 27 comments · Fixed by cplusplus/draft#6701
Labels
B2 - improvement Bucket 2 as described by P0592: bug fixes, performance improvements, integration fixes for/between e C++26 Targeted at C++26 IS Ship vehicle: IS LWG Library plenary-approved Papers approved for inclusion in their target vehicle by plenary vote. size - small paper size estimate
Milestone

Comments

@wg21bot
Copy link
Collaborator

wg21bot commented Dec 27, 2020

P2264R0 Make assert() macro user friendly for C and C++ (Peter Sommerlad)

@wg21bot wg21bot added LEWG Library Evolution LEWGI Library Evolution Incubator labels Dec 27, 2020
@wg21bot wg21bot added this to the 2021-telecon milestone Dec 27, 2020
@jensmaurer jensmaurer added the SG22 C / C++ liaison label Jan 14, 2021
@brycelelbach brycelelbach removed LEWG Library Evolution LEWGI Library Evolution Incubator labels Jan 25, 2021
@brycelelbach
Copy link

Clearing LEWG and LEWGI tags for now as we want the C Interop Study Group (SG22) to look at this first. @AaronBallman, once SG22 has forwarded this, please remove any needs-revision tag and add a LEWG tag.

@AaronBallman
Copy link
Collaborator

SG22 reviewed this paper at our Mar 05, 2021 meeting.

Should the assert macro be changed to be a variadic macro along the lines of P2264R0?
SF F N A SA (WG21)
2 7 2 2 0 (Author voted: SF) Consensus

SF F N A SA (WG14)
3 1 0 0 0 (Consensus)

WG14 also reviewed this paper at the March 2021 plenary.

Does WG14 wish to see something along the lines of N2621 in C23:
Favor/Oppose/Abstain
7/3/8 (No consensus for change)

@AaronBallman AaronBallman added LEWG Library Evolution and removed SG22 C / C++ liaison labels Mar 8, 2021
@brycelelbach brycelelbach added size - small paper size estimate ready-for-library-evolution-meeting-review This paper needs to be discussed at a Library Evolution meeting B2 - improvement Bucket 2 as described by P0592: bug fixes, performance improvements, integration fixes for/between e labels Mar 22, 2021
@brycelelbach
Copy link

@AaronBallman and @cor3ntin please chat and determine if LEWG needs to see this.

@cor3ntin
Copy link

@brycelelbach WG14 didn't like the paper so unfortunately WG21 has to see it

@AaronBallman
Copy link
Collaborator

@brycelelbach WG14 didn't like the paper so unfortunately WG21 has to see it

Agreed. SG22 voted with consensus, so I think LEWG should see this. However, LEWG should be aware that WG14 does not have consensus for the change (so adoption of the proposal as-is would mean WG21 is introducing an incompatibility with C). If LEWG sees the paper and suggests substantial direction changes, it may be worth putting it back on the SG22 plate.

@brycelelbach brycelelbach added scheduled-for-library-evolution This paper has been scheduled for one of the groups: LEWG, LEWG Incubator, or a Mailing List review needs-revision Paper needs changes before it can proceed and removed scheduled-for-library-evolution This paper has been scheduled for one of the groups: LEWG, LEWG Incubator, or a Mailing List review labels Apr 23, 2021
@brycelelbach
Copy link

The author has indicated this needs revision.

@wg21bot
Copy link
Collaborator Author

wg21bot commented Oct 26, 2021

P2264R1 Make assert() macro user friendly for C and C++ (Peter Sommerlad)

@wg21bot wg21bot removed the needs-revision Paper needs changes before it can proceed label Oct 26, 2021
@wg21bot
Copy link
Collaborator Author

wg21bot commented Oct 26, 2021

P2264R2 Make assert() macro user friendly for C and C++ (Peter Sommerlad)

@brycelelbach brycelelbach added the IS Ship vehicle: IS label Dec 22, 2021
@jensmaurer jensmaurer modified the milestones: 2021-telecon, 2022-telecon Jan 1, 2022
@brycelelbach brycelelbach added the C++26 Targeted at C++26 label Feb 1, 2022
@brycelelbach
Copy link

Deferred to C++26.

@brycelelbach brycelelbach added ready-for-library-evolution-mailing-list-review This paper needs to be discussed on the Library Evolution mailing list and removed ready-for-library-evolution-meeting-review This paper needs to be discussed at a Library Evolution meeting labels Feb 1, 2022
@FabioFracassi FabioFracassi added ready-for-library-evolution-electronic-poll This paper needs to undergo a Library Evolution electronic poll and removed ready-for-library-evolution-meeting-review This paper needs to be discussed at a Library Evolution meeting scheduled-for-library-evolution This paper has been scheduled for one of the groups: LEWG, LEWG Incubator, or a Mailing List review labels Nov 10, 2022
@FabioFracassi
Copy link
Collaborator

FabioFracassi commented Nov 10, 2022

2022-11-09 13:00 to 15:00 UTC-10 Kona Library Evolution Meeting

2022-11-09 13:00 to 15:00 UTC-10 Kona Library Evolution Minutes

Champion: n/a (Fabio Fracassi presenting)

Chair: Fabio Fracassi

POLL: Forward P2264 to LWG as B2 Priority item for C++26 (to be confirmed by electronic polling) as an approved design.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
8 10 0 0 0

Attendance: 20 + 5

# of Authors: 0

Author Position: n/a

Outcome: Unanimous consent

Summary

We think of this as a letter of intend to keep/restore compatibility with C's assert Macro as soon as possible

Next Steps

Take a Library Evolution electronic poll to send P2264R4 (Make assert() macro user friendly for C and C++) to Library for C++26, classified as B2 - improvement.

@brycelelbach brycelelbach added the scheduled-for-library-evolution This paper has been scheduled for one of the groups: LEWG, LEWG Incubator, or a Mailing List review label Nov 18, 2022
@brycelelbach
Copy link

2022-11 Library Evolution Electronic Poll Outcomes

Poll 2.6: Send [P2264R4] Make assert Macro User Friendly For C And C++ to Library Working Group for C++26, classified as an improvement of an existing feature ([P0592R4] bucket 2 item).

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
13 7 0 2 0

Outcome: Consensus in favor.

@brycelelbach brycelelbach added LWG Library and removed LEWG Library Evolution ready-for-library-evolution-electronic-poll This paper needs to undergo a Library Evolution electronic poll scheduled-for-library-evolution This paper has been scheduled for one of the groups: LEWG, LEWG Incubator, or a Mailing List review labels Jan 23, 2023
@JeffGarland
Copy link
Member

https://wiki.edg.com/bin/view/Wg21issaquah2023/P2264R2-20230209

LWG reviewed at Issaquah. There are impenetrability concerns that need to be addressed.

@frederick-vs-ja
Copy link

frederick-vs-ja commented May 26, 2023

This might be a naïve question, but everyone seems to agree that we must keep assert as a macro. Why, tho? All of that could much easier be done if it were a language primitive. Of course, if <cassert> is not included, assert is a free identifier and a lot of people make use of it. But isn’t that solved by introducing __assert (or _Assert) as a keyword and have <cassert> simply #define assert __assert? A language-defined __assert can be completely parallel to static_assert.

This is addressed by P2884. (Github paper issue is currently missing. Why?)

Added now: #1561.

@tahonermann
Copy link
Collaborator

This is addressed by P2884. (Github paper issue is currently missing. Why?)

That paper is new for the May mailing that just completed. I'm guessing that (all of) the github issues for that mailing just haven't been created yet. Odd though, I see one for P2901.

@jwakely
Copy link
Member

jwakely commented May 26, 2023

LWG reviewed at Issaquah. There are impenetrability concerns that need to be addressed.

Implementability concerns too ;-)

@AlisdairM
Copy link

This might be a naïve question, but everyone seems to agree that we must keep assert as a macro. Why, tho? All of that could much easier be done if it were a language primitive. Of course, if <cassert> is not included, assert is a free identifier and a lot of people make use of it. But isn’t that solved by introducing __assert (or _Assert) as a keyword and have <cassert> simply #define assert __assert? A language-defined __assert can be completely parallel to static_assert.

This is addressed by P2884 : #1561.

Just to confirm that P2884 addresses only the comment about keywords, and not the issues addressed by P2264 itself.

@wg21bot
Copy link
Collaborator Author

wg21bot commented Sep 18, 2023

P2264R5 Make assert() macro user friendly for C and C++ (Peter Sommerlad)

@wg21bot wg21bot changed the title P2264 Make assert() macro user friendly for C and C++ P2264 R5 Make assert() macro user friendly for C and C++ Sep 18, 2023
@jensmaurer jensmaurer added the LEWG Library Evolution label Nov 6, 2023
@jensmaurer
Copy link
Member

Sent to LEWG for "contextual conversion to bool" concerns (see R5 revision history entry in the paper).

@inbal2l
Copy link
Collaborator

inbal2l commented Nov 8, 2023

The author decided to avoid the explicit conversion to bool, so we will not see this in LEWG.
Sending back to LWG.
@JeffGarland @jwakely - please verify that the paper rebates correctly on C++ version

@inbal2l inbal2l removed the LEWG Library Evolution label Nov 8, 2023
@inbal2l inbal2l added the plenary-approved Papers approved for inclusion in their target vehicle by plenary vote. label Dec 17, 2023
@wg21bot
Copy link
Collaborator Author

wg21bot commented Dec 19, 2023

P2264R6 Make assert() macro user friendly for C and C++ (Peter Sommerlad, )

@wg21bot wg21bot changed the title P2264 R5 Make assert() macro user friendly for C and C++ P2264 R6 Make assert() macro user friendly for C and C++ Dec 19, 2023
@wg21bot
Copy link
Collaborator Author

wg21bot commented Dec 19, 2023

P2264R7 Make assert() macro user friendly for C and C++ (Peter Sommerlad, )

@wg21bot wg21bot changed the title P2264 R6 Make assert() macro user friendly for C and C++ P2264 R7 Make assert() macro user friendly for C and C++ Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B2 - improvement Bucket 2 as described by P0592: bug fixes, performance improvements, integration fixes for/between e C++26 Targeted at C++26 IS Ship vehicle: IS LWG Library plenary-approved Papers approved for inclusion in their target vehicle by plenary vote. size - small paper size estimate
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.