See https://github.com/cplusplus/draft/pull/5204 for a detailed background.
Simply, the test redundant-template-default-arg.cpp attached to this patch should be accepted instead of being complained about the redefinition.
Differential D118034
[C++20] [Modules] Don't complain about duplicated default template argument across modules ChuanqiXu on Jan 24 2022, 4:12 AM. Authored by
Details
See https://github.com/cplusplus/draft/pull/5204 for a detailed background. Simply, the test redundant-template-default-arg.cpp attached to this patch should be accepted instead of being complained about the redefinition.
Diff Detail Event Timeline
Comment Actions Address comment to check if the duplicated default template arguments are the same and add tests to address the negative cases. Comment Actions Use ODRHash to simplify code.
|
ODR hashing is intended to produce a hash that's stable across compilations (so it can't use pointer comparisons to check types are identical, for example). For use cases that don't need a hash code that's stable across processes, using Stmt::Profile should be preferred. Can you use that here?