Final bits for libstdc/71579 std::common_type assertions attempt to give a proper 'required from here' hint for user code, do not bring many changes to the implementation and check all the template parameters for completeness. In some cases the type could be checked for completeness more than once. This seems to be unsolvable due to the fact that std::common_type could be specialized by the user, so we have to call std::common_type recursively, potentially repeating the check for the first type. std::common_reference assertions make sure that we detect incomplete types even if the user specialized the std::basic_common_reference. Changelog: 2020-11-12 Antony Polukhin PR libstdc/71579 * include/std/type_traits (is_convertible, is_nothrow_convertible) (common_type, common_reference): Add static_asserts to make sure that the arguments of the type traits are not misused with incomplete types. * testsuite/20_util/common_reference/incomplete_basic_common_neg.cc: New test. * testsuite/20_util/common_reference/incomplete_neg.cc: New test. * testsuite/20_util/common_type/incomplete_neg.cc: New test. * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc: Remove SFINAE tests on incomplete types. * testsuite/20_util/is_convertible/incomplete_neg.cc: New test. * testsuite/20_util/is_nothrow_convertible/incomplete_neg.cc: New test. -- Best regards, Antony Polukhin