https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71579
Bug ID: 71579
Summary: type_traits miss checks for type completeness in some
traits
Product: gcc
Version: 6.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: antoshkka at gmail dot com
Target Milestone: ---
Completeness is the requirement of C++ Standard. Without completeness check
hard detectable errors are possible:
#include <type_traits>
struct foo;
void kill_sanity() {
(void)std::is_constructible<foo, foo>::value;
}
struct foo{};
int main() {
static_assert(std::is_constructible<foo, foo>::value, "foo must be
constructible from foo"); // Oops!
}
All the std::is_*constructible, is_convertible, is_base_of, is_destructible,
is_*swappable, has_virtual_destructor traits are affected.
Minor: multiple triats (like aligned_union and common_type) may have a
static_assert in them, providing a more readable error message in cse of
incomplete type.