Error "more than one instance of constructor" while using boost::assign::list_of
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
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
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
#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
"Jeff Flinn"
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
#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); Succeeded
or
const std::vector<int> primes(boost::assign::list_of(2)(3)(5)(7)(11)); Failed
if these don't work, have you looked at whether tests for assign library pass on HP acc? Where test is?
Jeff
Alex
if these don't work, have you looked at whether tests for assign library pass on HP acc?
Where test is?
Here it is : http://www.boost.org/development/tests/trunk/developer/assign.html (and it seems to pass the tests)
participants (4)
-
Alex Vinokur
-
Alexander Vinokur
-
Jeff Flinn
-
Mathieu -