Opened 7 years ago
Closed 7 years ago
#11449 closed Bugs (fixed)
[C++11] is_polymorphic doesn't work with final-ed class in MSVC.
Reported by: | Owned by: | John Maddock | |
---|---|---|---|
Milestone: | Boost 1.60.0 | Component: | type_traits |
Version: | Boost Development Trunk | Severity: | Problem |
Keywords: | Cc: |
Description
Following code don't compile in MSVC 12 and 14 RC: I didn't test with other versions.
#include <type_traits> #include <boost/type_traits/is_polymorphic.hpp> struct S final {}; int main() { static_assert(!std::is_polymorphic<S>::value, "S should not be a polymorphic type"); // works fine static_assert(boost::is_polymorphic<final>::value, "hmm..."); // hard error }
The error message says:
'boost::detail::is_polymorphic_impl1<T>::d1' cannot derive from 'S' because it is declared as 'final'.
Attachments (1)
Change History (3)
by , 7 years ago
Attachment: | 66bfcbfd052b0b94e6fe284d4a2ac78a.png added |
---|
comment:1 by , 7 years ago
comment:2 by , 7 years ago
Milestone: | To Be Determined → Boost 1.60.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Fixed in https://github.com/boostorg/type_traits/commit/04a8a9ecc2b02b7334a4b3f0459a5f62b855cc68
Note this patch will almost certainly not make the next release.
Note:
See TracTickets
for help on using tickets.
Confirmed.