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

DR: Resolutions to CA 008 and CA 016 do not mix #65

Open
hubert-reinterpretcast opened this issue Sep 21, 2019 · 2 comments
Open

DR: Resolutions to CA 008 and CA 016 do not mix #65

hubert-reinterpretcast opened this issue Sep 21, 2019 · 2 comments

Comments

@hubert-reinterpretcast
Copy link

CA 016 indicates that applying reflexpr on a constant id-expression naming a non-volatile const (but not constexpr) variable does not produce a meta-object type that satisfies Constant, but CA 008 indicates that the meta-object type so produced should satisfy Constant.

I think we can't fix this without CWG or EWG input. I'll send a note to CWG if we can confirm that we can't fix this during the current review process.

@camio
Copy link

camio commented Jan 27, 2020

HT: Please address as an issue introduced during NB comment resolution process
(would like to hear from Axel)

AN: Good catch. The intent is that the type specified by a reflex operand of
id-expression kind, where the id-expression is usable in constant expressions,
satisfies Constant. That will include const variables. I.e.

const int s = 12;
int arr[s];
static_assert(Constant<reflexpr(s)>)

AN: should not assert. Hubert, does "id-expression usable in constant
expressions" sound like the right magic spell here? It's what we use in
[expr.const]p3.

@camio
Copy link

camio commented Jan 27, 2020

Left open as an issue to handle post-publication.

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

No branches or pull requests

2 participants