[Boost-bugs] [Boost C++ Libraries] #11449: [C++11] is_polymorphic doesn't work with final-ed class in MSVC.

Subject: [Boost-bugs] [Boost C++ Libraries] #11449: [C++11] is_polymorphic doesn't work with final-ed class in MSVC.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-07-03 09:01:43


#11449: [C++11] is_polymorphic doesn't work with final-ed class in MSVC.
---------------------------------------+-------------------------
 Reporter: Kohei Takahashi <flast@…> | Owner: johnmaddock
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: type_traits
  Version: Boost Development Trunk | Severity: Problem
 Keywords: |
---------------------------------------+-------------------------
 Following code don't compile in MSVC 12 and 14 RC: I didn't test with
 other versions.

 {{{
 #!c++
 #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
 }
 }}}

 [[Image(66bfcbfd052b0b94e6fe284d4a2ac78a.png)]]

 The error message says:

     'boost::detail::is_polymorphic_impl1<T>::d1' cannot derive from 'S'
 because it is declared as 'final'.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11449>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:18 UTC