Skip to content

Conversation

@hahnjo
Copy link
Member

@hahnjo hahnjo commented Aug 12, 2022

Current clang-16 from main complains: "case value is not a constant expression". Even if that error is probably relaxed before Clang 16 is released early next year, there is really no point in converting an integer into an enum just to get a numeric value back.

This is (intentionally) a partial revert of commit ac36d87. An alternative solution appears to be replacing EProperty (which refers to the enum type in TVirtualCollectionProxy) with ::EProperty from TDictionary.h. However, since the enum values are used as a bit mask and fCase is defined as UInt_t anyhow, it makes more sense to compare integer constants from the start.

Closes #11128

(cherry picked from commit cc28da5)

Backport of PR #11148

Current clang-16 from main complains: "case value is not a constant
expression". Even if that error is probably relaxed before Clang 16
is released early next year, there is really no point in converting
an integer into an enum just to get a numeric value back.

This is (intentionally) a partial revert of commit ac36d87. An
alternative solution appears to be replacing EProperty (which refers
to the enum type in TVirtualCollectionProxy) with ::EProperty from
TDictionary.h. However, since the enum values are used as a bit mask
and fCase is defined as UInt_t anyhow, it makes more sense to compare
integer constants from the start.

Closes root-project#11128

(cherry picked from commit cc28da5)
@hahnjo hahnjo requested a review from pcanal as a code owner August 12, 2022 07:16
@hahnjo hahnjo self-assigned this Aug 12, 2022
@phsft-bot
Copy link

Starting build on ROOT-debian10-i386/soversion, ROOT-performance-centos8-multicore/cxx17, ROOT-ubuntu18.04/nortcxxmod, ROOT-ubuntu2004/python3, mac1015/cxx17, mac11/cxx14, windows10/cxx14
How to customize builds

@hahnjo hahnjo merged commit 7b9f152 into root-project:v6-26-00-patches Aug 12, 2022
@hahnjo hahnjo deleted the io-case-v626 branch August 12, 2022 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants