28 May
2015
28 May
'15
9:14 p.m.
I sketched an implementation along those lines, ...
It's at https://github.com/pdimov/common_type Take a look and let's see how to proceed from there. I haven't yet done the member pointers, which I suspect nobody uses (they aren't covered by the existing tests), but I'll add them later for completeness. I've applied decay<> up front for simplicity, instead of faithfully doing the reference-preserving work and then throwing that away, which makes a difference in some corner cases, but I doubt that anybody will be able to tell the difference. (Needless to say, those corner cases aren't being tested at the moment.) :-) Incidentally, why is our decay<> not the same as std::decay? Should it be changed to conform?