This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/41316] [C++0x] forward_list::sort violates strict aliasing rules



------- Comment #17 from rguenth at gcc dot gnu dot org  2009-09-09 14:31 -------
As I said the proper fix would be to move _M_sort_after to _Fwd_list_node_base
to be able to simply do

      void
      sort()
      {
        this->_M_impl._M_head._M_sort_after(std::less<_Tp>());
      }

instead of going via the invalid cast.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41316


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]