From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2004-05-27 00:58:11
"Joel de Guzman" <joel_at_[hidden]> wrote in message news:40B57D2D.6070905_at_boost-consulting.com...
| > 2. if we shouldn't copy a rule, why is copying not disabled? It has been a source of errors in my code that
| > I forgot & on my return value.
| I believe http://www.boost.org/libs/spirit/doc/stored_rule.html
| answers this question.
"The rule is a wierd C++ citizen, unlike any other C++ object. It does not have the proper copy and assignment semantics and cannot
be stored and passed around by value. You cannot store rules in STL containers (vector, stack, etc) for later use and you cannot
pass and return rules to and from functions by value."
I have read this page before, but I still don't get why the rule has copy and assignment semantics at all.
Afterall, you admit copying and assignment does not make sense, yet it is still defined :-) What am I overlooking? Why do we need
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk