Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2004-05-27 00:58:11

Hi Joel,

"Joel de Guzman" <joel_at_[hidden]> wrote in message

| > 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
| 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
the current
copy/assignment semantics?



Boost list run by bdawes at, gregod at, cpdaniel at, john at