[Boost-bugs] [Boost C++ Libraries] #11757: ptr_list no longer compiles in msvc2013

Subject: [Boost-bugs] [Boost C++ Libraries] #11757: ptr_list no longer compiles in msvc2013
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-10-27 12:31:00


#11757: ptr_list no longer compiles in msvc2013
------------------------------+---------------------------
 Reporter: anonymous | Owner: nesotto
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: ptr_container
  Version: Boost 1.59.0 | Severity: Regression
 Keywords: |
------------------------------+---------------------------
 This code does no longer compile with 1.59.0 but did with 1.55.0
 (using MSVC 2013)

 {{{
 #include "boost/ptr_container/ptr_list.hpp"

 class MyClass {
 public:
     MyClass() {}
 };

 int main(int argc, char* argv[])
 {
     typedef boost::ptr_list< MyClass > tMyList;
     tMyList theList;
     theList.resize(42, NULL);
 }

 }}}

 this is the output:


 {{{
 cl boost_ptr_list.cpp
 Microsoft (R) C/C++ Optimizing Compiler Version 18.00.40629 for x86
 Copyright (C) Microsoft Corporation. All rights reserved.

 boost_ptr_list.cpp
 boost/ptr_container/detail/void_ptr_iterator.hpp(104) : error C2676:
 binary '+=' :
 'std::_List_iterator<std::_List_val<std::_List_simple_types<void *>>>'
 does not define this operator or a conversion to a type acceptable to the
 pre
 defined operator
 C:\Projects\AE16.0\boost\boost/ptr_container/detail/void_ptr_iterator.hpp(103)
 : while compiling class template member function
 'boost::void_ptr_iterator<std::_List_iterator<std::_List_val<std::_List_simple_types<void
 *>>>,MyClass>
 &boost::void_ptr_iterator<std::_List_iterator<std::_List_val<std::_List_simple_types<void
 *>>>,MyClass>::operator +=(__w64 int)'
         C:\Projects\AE16.0\boost\boost/next_prior.hpp(73) : see reference
 to function template instantiation
 'boost::void_ptr_iterator<std::_List_iterator<std::_List_val<std::_List_simple_types<void
 *>>>,MyClass>
 &boost::void_ptr_iterator<std::_List_iterator<std::_List_val<std::_List_simple_types<void
 *>>>,MyClass>::operator +=(__w64 int)' being compiled
 C:\Projects\AE16.0\boost\boost/ptr_container/ptr_sequence_adapter.hpp(535)
 : see reference to class template instantiation
 'boost::void_ptr_iterator<std::_List_iterator<std::_List_val<std::_List_simple_types<void
 *>>>,MyClass>' being compiled
 C:\Projects\AE16.0\boost\boost/ptr_container/ptr_sequence_adapter.hpp(531)
 : while compiling class template member function 'void
 boost::ptr_sequence_adapter<T,std::list<void
 *,Allocator>,CloneAllocator>::resize(unsigned int,MyClass *)'
         with
         [
             T=MyClass
 , Allocator=std::allocator<void *>
 , CloneAllocator=boost::heap_clone_allocator
         ]
         boost_ptr_list.cpp(12) : see reference to function template
 instantiation 'void boost::ptr_sequence_adapter<T,std::list<void
 *,Allocator>,CloneAllocator>::resize(unsigned int,MyClass *)' being
 compiled
         with
         [
             T=MyClass
 , Allocator=std::allocator<void *>
 , CloneAllocator=boost::heap_clone_allocator
         ]
         C:\Projects\AE16.0\boost\boost/ptr_container/ptr_list.hpp(35) :
 see reference to class template instantiation
 'boost::ptr_sequence_adapter<T,std::list<void
 *,Allocator>,CloneAllocator>' being compiled
         with
         [
             T=MyClass
 , Allocator=std::allocator<void *>
 , CloneAllocator=boost::heap_clone_allocator
         ]
         boost_ptr_list.cpp(11) : see reference to class template
 instantiation
 'boost::ptr_list<MyClass,boost::heap_clone_allocator,std::allocator<void
 *>>' being compiled


 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11757>
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:19 UTC