* Marco Segurini:
I have a class with some member-functions. I should like to have a way
to add a non-static-member-variabile to the class that be visible by
only one member function.
C++ doesn't directly support that. You can make that member function its
own class that you inherit from, but passing all necessary information up
the chain might entail some run-time inefficiency. Also, it's a lot of
complication for very little gain.
On the other hand, a solution somewhat like that can (just can) be good
medicine for 'mutable'.
And also for resolving e.g. order-of-initialization. It's a very common,
what should I say, meta-pattern. Try it, and if you don't like the result
(I'm sure that I wouldn't, for your case), then just accept the language as
it is, and/or consider _redesigning_ your class.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?