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

char_traits<char8_t> members not all constexpr #2795

Closed
BoPersson opened this issue Mar 16, 2019 · 6 comments · Fixed by #2833
Closed

char_traits<char8_t> members not all constexpr #2795

BoPersson opened this issue Mar 16, 2019 · 6 comments · Fixed by #2833
Assignees
Milestone

Comments

@BoPersson
Copy link

The paper P1032 "Misc constexpr bits" added constexpr to all char_traits members, at the same time as P0432 "char8_t: A type for UTF-8 characters and strings" added a new specialization for char_traits<char8_t> (without constexpr).

Depending on the order of applying the papers we could get two different results.

The intention of P1032 surely is that even the new members should be constexpr.

@jwakely
Copy link
Member

jwakely commented Mar 16, 2019

I agree. Arguably, the intention is clear, so it could be considered editorial, but it might need to go through LWG.

@jensmaurer
Copy link
Member

@zygoloid, is this editorial?

@tahonermann
Copy link
Contributor

My intent was certainly to keep the char8_t specialization consistent with the others. I agree with fixing this editorially if @zygoloid is comfortable with that.

@zygoloid zygoloid added lwg Issue must be reviewed by LWG. not-editorial Issue is not deemed editorial; the editorial issue is kept open for tracking. and removed lwg Issue must be reviewed by LWG. not-editorial Issue is not deemed editorial; the editorial issue is kept open for tracking. labels Apr 18, 2019
@zygoloid
Copy link
Member

zygoloid commented Apr 18, 2019

OK, I've reviewed the history here. As noted, P1032R1 and P0482R6 were moved at the same meeting (and P0482R6 was moved first); P1032R1 says to apply a pattern systematically across all char_traits specializations, rather than calling out the specific existing specializations. So I think we merged the applications of P0482R6 and P1032R1 inappropriately; the right way to combine them would have been to make these three functions constexpr for char8_t.

Let's make this change editorially in the name of fixing the misapplication of prior motions, but send a notification to LWG to inform them that we're doing so.

@Dani-Hub
Copy link
Member

Dani-Hub commented May 5, 2019

I noticed the problem described in this issue today and was considering to open an LWG issue for this. Can I relax now and assume that an editorial change will be applied instead?

@jensmaurer
Copy link
Member

LWG chair was informed:

Subject: [isocpp-edit] [char.traits.specializations.char8.t] Make all members constexpr
Date: Mon, 27 May 2019 09:07:07 +0200
From: Jens Maurer Jens.Maurer@gmx.net
Reply-To: IS and TS editorial discussions edit@lists.isocpp.org
To: Marshall Clow mclow.lists@gmail.com
CC: IS and TS editorial discussions edit@lists.isocpp.org

Dear LWG chair:

This is to inform you that an editorial change has been applied
that you might consider a non-trivial merge of two papers
approved at the 2018-11 meeting:

#2833

Thank you.
Jens (co-editor)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants