|
Boost Users : |
From: Ben Hutchings (ben.hutchings_at_[hidden])
Date: 2004-01-06 11:27:54
John <ripsnorta_at_[hidden]> wrote:
> I have been trying to get one of the spirit examples, regex_convert
> to build using VC6, service pack 5. I am using boost 1-30.2 for this
> exercise. I get the following error message.
>
> error C2664: '__thiscall std::deque<char,class std::allocator<char>
> >::std::deque<char,class std::allocator<char> >(unsigned int,const
> char&,const class std::allocator<char> &)'
That means a constructor for std::deque.
> : cannot convert parameter 1 from 'class std::istreambuf_iterator<
> char,struct std::char_traits<char> >' to 'unsigned int'
> No user-defined-conversion operator available that can
> perform this conversion, or the operator cannot be called
>
> I was wondering if this was a known issue, or if there was something
> else that I needed to do.
This is a problem with the standard library implementation. Although
VC++ 6 has some support for template member functions, the library that
comes with it was written for an earlier version that did not and was
not updated to include template member functions. So it does not
define the constructor template for std::deque that takes two iterators
(though it does define a constructor that takes two const T * pointers,
where T is the element type).
I think the example will work if you install STLPort or Dinkumware's
newer library as a (partial) replacement for VC++ 6's standard library.
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