-
Notifications
You must be signed in to change notification settings - Fork 133
Test for name normalization involving size_t template argument #1302
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
base: master
Are you sure you want to change the base?
Conversation
namespace reco { | ||
template <size_t I, bool B> struct PFRecHitSoALayout { | ||
template <size_t II, bool B1, bool B2, bool B3> struct ViewTemplateFreeParams {}; | ||
using View = ViewTemplateFreeParams<I, B, true, true>; | ||
}; | ||
using PFRecHitSoA = PFRecHitSoALayout<128,false>; // The result is the same with 128UL or 128ul | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The minimal reproducer to trigger the problem is:
template <unsigned I> struct PFRecHitSoALayout {
struct View {};
};
This normalizes to PFRecHitSoALayout<128U>::View
.
A couple of conclusions:
- The problem is not particular to
size_t
, it just has to be a builtin type whereprintIntegral
decides to print a suffix. - It has nothing to do with
using
declarations that "forward" a template argument. - It is not even required for the inner type to be a
template
.
FYI @vgvassilev (not a standalone reproducer yet)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I recalled correctly, it does not add the suffix for int. I.e. being an unsigned
type might be the discriminant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, as I write
it just has to be a builtin type where
printIntegral
decides to print a suffix
That's not the case for int
, but also includes signed long
for example.
This is the companion PR of root-project/root#18373