Opened 7 years ago

#11757 new Bugs

ptr_list no longer compiles in msvc2013

Reported by: anonymous Owned by: Thorsten Ottosen
Milestone: To Be Determined Component: ptr_container
Version: Boost 1.59.0 Severity: Regression
Keywords: Cc:

Description

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


Change History (0)

Note: See TracTickets for help on using tickets.