I have the following code:
#include <iostream>
class A;
int main()
{
std::cout << std::is_constructible<A>::value << std::endl;
}
When I use GCC 8.3, this code compiles. However, when I use Clang 8.0, I get a compilation error that incomplete types cannot be used in type traits.
Which one is correct? Am I allowed to use is_constructible
on an incomplete type (with an expected value of false
), or am I not allowed to?