libc++: is_abstract<abstract_class_template<T>>::value is false

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

libc++: is_abstract<abstract_class_template<T>>::value is false

Eric Fiselier via cfe-dev
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.

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

test_is_abstract.cc (526 bytes) Download Attachment
signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: libc++: is_abstract<abstract_class_template<T>>::value is false

Eric Fiselier via cfe-dev
Hi Katsuhiko,

This is indeed a libc++ bug. Thank you for reporting it.

I have filed an actual bug report here: https://bugs.llvm.org/show_bug.cgi?id=32097

/Eric

On Fri, Feb 24, 2017 at 4:29 AM, Katsuhiko Nishimra via cfe-dev <[hidden email]> wrote:
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.

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev



_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev