Opened 7 years ago

Closed 7 years ago

#11387 closed Bugs (duplicate)

list.emplace_back() broken on Visual Studio 2010

Reported by: rafael.gago@… Owned by: Ion Gaztañaga
Milestone: To Be Determined Component: container
Version: Boost 1.58.0 Severity: Showstopper
Keywords: Cc:

Description

The sample below fails to compile with 1.58. It has no problem with 1.57.

#include <boost/container/list.hpp>
#include <boost/container/vector.hpp>

struct simple_type {
    
    simple_type (int a, int b, int c, int d, int e, int f, int g)
    {
        a_ = a;
        b_ = b;
        c_ = c;
        d_ = d;
        e_ = e;
        f_ = f;
        g_ = g;        
    };

    int a_, b_, c_, d_, e_ , f_, g_;
};

int main()
{
    boost::container::vector<simple_type> vector;
    vector.emplace_back (1, 2, 3, 4, 5, 6, 7);

    boost::container::list<simple_type> list;
    list.emplace_back (1, 2, 3, 4, 5, 6, 7);

    return 0;
}

The error reported:

1>------ Build started: Project: intrusive_list, Configuration: Debug Win32 ------
1>  stdafx.cpp
1>  list_bug.cpp
1>c:\boost_versions\boost_1_58_0\boost\container\list.hpp(753): error C2660: 'boost::container::container_detail::node_alloc_holder<Allocator,ICont>::create_node' : function does not take 7 arguments
1>          with
1>          [
1>              Allocator=boost::container::new_allocator<simple_type>,
1>              ICont=boost::intrusive::list_impl<boost::intrusive::bhtraits<boost::container::container_detail::list_node<simple_type,void *>,boost::intrusive::list_node_traits<void *>,normal_link,boost::intrusive::dft_tag,1>,unsigned int,true,boost::intrusive::list_defaults::header_holder_type>
1>          ]
1>          c:\boost_versions\boost_1_58_0\boost\container\list.hpp(753) : see reference to function template instantiation 'boost::container::container_detail::iterator_from_iiterator<IIterator,IsConst> boost::container::list<T>::emplace<int,int,int,int,int,int,int>(boost::container::container_detail::iterator_from_iiterator<IIterator,true>,P0 &&,P1 &&,P2 &&,P3 &&,P4 &&,P5 &&,P6 &&)' being compiled
1>          with
1>          [
1>              IIterator=boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<simple_type,void *>,boost::intrusive::list_node_traits<void *>,normal_link,boost::intrusive::dft_tag,1>,false>,
1>              IsConst=false,
1>              T=simple_type,
1>              P0=int,
1>              P1=int,
1>              P2=int,
1>              P3=int,
1>              P4=int,
1>              P5=int,
1>              P6=int
1>          ]
1>          c:\users\rafgag\vcb1000dd.git_migrated\build\intrusive_list\intrusive_list.cpp(31) : see reference to function template instantiation 'void boost::container::list<T>::emplace_back<int,int,int,int,int,int,int>(P0 &&,P1 &&,P2 &&,P3 &&,P4 &&,P5 &&,P6 &&)' being compiled
1>          with
1>          [
1>              T=simple_type,
1>              P0=int,
1>              P1=int,
1>              P2=int,
1>              P3=int,
1>              P4=int,
1>              P5=int,
1>              P6=int
1>          ]
1>c:\boost_versions\boost_1_58_0\boost\container\list.hpp(753): fatal error C1903: unable to recover from previous error(s); stopping compilation
1>  Generating Code...
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Change History (2)

comment:1 by anonymous, 7 years ago

Triplicated. My browser was taking minutes to submit the bug, so I resubmitted. Please delete this. (BTW I noticed that this server it's very slow to add comments too, at least now)

comment:2 by Ion Gaztañaga, 7 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #11388

Note: See TracTickets for help on using tickets.