Boost logo

Boost Users :

From: Eric Niebler (eric_at_[hidden])
Date: 2007-10-16 11:36:08


Ovanes Markarian wrote:
> I now know that this is an invalid usage, after I know that 'smatch' is
> based on iterators. Since 'smatch' does not encover in the docs what
> internal structure it has, I did not conclude that it is based on
> iterators. And a string const& as param does not mean for me, that this
> string should be valid later on. May be I am wrong.

The docs are pretty explicit about smatch using iterators. See the
section "Results Invalidation" here:

<http://boost-sandbox.sourceforge.net/libs/xpressive/doc/html/boost_xpressive/user_s_guide/accessing_results.html>

> BTW: the trick with volatile does not work in MSVC 8.0 Express compiler.
> :( Would be great if the upcoming standard would provide a temporary
> checking facility ;)

Yes, I know. It's a compiler bug. FYI, the next standard *does* provide
a way to detect temporary objects. It's called "rvalue references".

> Many thanks for the great lib and your time!

My pleasure. Thanks for the feedback.

-- 
Eric Niebler
Boost Consulting
www.boost-consulting.com

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