|
Boost Users : |
From: Ovanes Markarian (om_boost_at_[hidden])
Date: 2007-03-06 14:26:31
Many thanks for such a quick response!
On Tue, March 6, 2007 20:09, Hartmut Kaiser wrote:
>
> Ovanes Markarian wrote:
>
[snipped clarified text]
>
>> I assume compiler dereferences iterator to char and char has
>> no member to get_value. Does anyone have suggestions?
>
> That's a bug. It's fixed in CVS::HEAD now. You can work around this problem
> for now by using a instance of context_type::token_type::string_type instead
> of a std::string for now.
I tried to work with context_type::token_type::string_type (On my machine it is resolved to
flex_string) the problem is that the construct:
std::string s1("some string...");
context_type::token_type::string_type s2(s1->begin(), s1->end());
crashed the app in the assign function call from the ctor:
template <class InputIterator>
flex_string(InputIterator begin, InputIterator end, const A& a = A())
: Storage(a)
{
flex_string.hpp:1479: assign(begin, end); >>>> boom!!!
}
The problem is:
assign calls replace:
template<class InputIterator>
line 1906: flex_string& replace(iterator i1, iterator i2,
InputIterator j1, InputIterator j2)
{
return ReplaceImpl(i1, i2, j1, j2,
Selector<std::numeric_limits<InputIterator>::is_specialized>());
}
Replace has BOOST_ASSERT(false) statement:
template<class InputIterator>
line 1897: flex_string& ReplaceImpl(iterator i1, iterator i2,
InputIterator b, InputIterator e, Selector<0>)
{
BOOST_ASSERT(false);
return *this;
}
> I'll try to add these fixes to the upcoming release as well, but will have
> to ask the release manager first.
>
> Regards Hartmut
>
May be you can take a look at the calling logic and why this assertion should fail?
Many Thanks for your help!
With Kind Regards,
Ovanes Markarian
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