This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Patch for common_type. It's using __typeof__ instead of decltype until PR 36628 is resolved. I'm not sure if the test cases are sufficient or if the crazy macro's are allowed to be used in test cases (I didn't see any being used in the other modification type traits). Also, order is important in the common_type def'n. I.e. given commom_type<A,B,C>::type, say A and B are both implicitly convertible to C. But, A and B implicitly convert to D and D is NOT implicitly convertible to C. So the instantiation goes: common_type<A,B,C> == common_type<D,C> == failure. But if C was before B, then: common_type<A,C,B> == common_type<C,B> == C I just want to make sure this is intentional and that common_type isn't expected to try every permutation of the given types. Thanks, Chris
Attachment:
patch_common_type.txt
Description: Text document
Attachment:
Changelog_common_type.txt
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |