[cfe-dev] libc++: is_abstract<abstract_class_template<T>>::value is false

Katsuhiko Nishimra via cfe-dev cfe-dev at lists.llvm.org
Fri Feb 24 03:29:04 PST 2017


Dear developers,

I've run into strange behavior around std::is_abstract from libc++.
It off course returns true for classes with pure virtual functions, but
returns false for class templates with pure virtual functions. I'm
attaching a test code for the behavior. I tested on Debian with package
libc++-dev 3.9.1-2 and both clang-3.8 3.8.1-17 and clang-3.9.1-4.

I have little knowledge about C++ standards, but is this behavior
compliant with the standards?

FWIW, std::is_abstract from libstdc++ returns true for both cases.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_is_abstract.cc
Type: text/x-c++src
Size: 507 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170224/a83336c6/attachment.cc>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170224/a83336c6/attachment.sig>


More information about the cfe-dev mailing list