[v3] c++0x common_type patch
Chris Fairles
chris.fairles@gmail.com
Thu Jul 3 21:15:00 GMT 2008
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
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_common_type.txt
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20080703/554acb18/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Changelog_common_type.txt
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20080703/554acb18/attachment-0001.txt>
More information about the Libstdc++
mailing list