As far as I can tell, the SFINAE was broken; there is no such thing as
Since is_trivially_constructible<T>::type doesn't exist, wouldn't this always be a substitution failure?
Ah, ::type exists, it is either true_type or false_type. I still don't see how this ever worked, though, because then there's still no SFINAE...
Lint: Pre-merge checks
I chose not to reformat this patch because it's a tricky diff that I wanted to keep small and I'm going to reformat it in a later patch that changes all enable_if to enable_if_t anyway. But I can reformat it if reviewers would like.
Thank you for the reviews!
this sounds like something that might make a nice clang-tidy check?
Good idea! Is there a place where people keep track of open clang-tidy check requests?
(Another way this could have been caught is if LLVM supported "negative compilation tests", i.e. unit tests that check that certain code doesn't compile.)