Boost logo

Boost Users :

Subject: [Boost-users] Error "more than one instance of constructor" while using boost::assign::list_of
From: Alexander Vinokur (Alexander.Vinokur_at_[hidden])
Date: 2010-05-06 01:54:09


Hi,

I have the following problem with boost::assign::list_of

HP-UX
aCC: HP C/aC++ B3910B A.06.25 [Nov 30 2009]
BOOST 1.34
boost2.cpp
// ----------------------------
#include <boost/assign/list_of.hpp>
#include <vector>

int main()
{
            const std::vector<int> primes = std::vector<int> (boost::assign::list_of(2)(3)(5)(7)(11));

            return 0;
}
// ---------------------------

> aCC +DD64 -AA -I$BOOST_HOME boost2.cpp

"boost2.cpp", line 7: error #2309: more than one instance of constructor
          "std::vector<_TypeT, _Allocator>::vector [with _TypeT=int,
          _Allocator=std::allocator<int>]" matches the argument list:
            function "std::vector<_TypeT, _Allocator>::vector(const _Allocator
                      &) [with _TypeT=int, _Allocator=std::allocator<int>]"
            function "std::vector<_TypeT,
                      _Allocator>::vector(_Allocator::size_type) [with
                      _TypeT=int, _Allocator=std::allocator<int>]"
            function "std::vector<_TypeT, _Allocator>::vector(const
                      std::vector<_TypeT, _Allocator> &) [with _TypeT=int,
                      _Allocator=std::allocator<int>]"
            argument types are: (boost::assign_detail::generic_list<int>)
        const std::vector<int> primes = std::vector<int> (boost::assign::list_of(2)(3)(5)(7)(11));

Thank.
Alex Vinokur

This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement,
you may review at http://www.amdocs.com/email_disclaimer.asp



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net