On 5 April 2016 at 13:53, Jonathan Wakely wrote: > I wonder if we want an __is_samey trait that checks if two decayed > types are the same. If such checks become more common, then yes. For now, perhaps not. > More seriously, a comment might be useful to explain that although > these "concepts" return true for samey types, that is just to prevent > is_constructible from getting into a mess with incomplete types, and > actually for samey types one of the special member functions might end > up being chosen by overload resolution instead. > > Did I get that right? If so, I definitely think it's worth a comment, > as I for one won't remember the details in a few months! How about the attached new patch? I just added a comment at the top of these "concept utilities". In general, there's an unfortunate amount of such trickery needed to get pair and tuple right as far as their constraints go, to protect the innocent overloads from getting input that they can't cope with, as such constraints are evaluated during overload resolution, and in some cases that evaluation will be done even for overloads that will certainly not be chosen, but they have to be prepared for input that is hard to digest. That's one of the reasons why 'if constexpr' will be a godsend, but I should not digress there right now. :)