|
Boost Users : |
Subject: Re: [Boost-users] Error "more than one instance of constructor" while using boost::assign::list_of
From: Jeff Flinn (TriumphSprint2000_at_[hidden])
Date: 2010-05-06 07:49:49
Alexander Vinokur wrote:
> 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));
This works on boost 1.42.0 on MSVC8. Have you tried the alternatives:
const std::vector<int> primes = boost::assign::list_of(2)(3)(5)(7)(11);
or
const std::vector<int> primes(boost::assign::list_of(2)(3)(5)(7)(11));
if these don't work, have you looked at whether tests for assign library
pass on HP acc?
Jeff
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