Using SFINAE to check if the type is complete or not [duplicate]
问题 This question already has answers here : How to write `is_complete` template? (7 answers) Closed 5 years ago . Is it possible to check with SFINAE if the type is completely defined? E.g. template <class T> struct hash; template <> struct hash<int> {}; // is_defined_hash_type definition... enum Enum { A, B, C, D }; static_assert ( is_defined_hash_type<int> ::value, "hash<int> should be defined"); static_assert (! is_defined_hash_type<Enum>::value, "hash<Enum> should not be defined"); The