Inside the KCC optimizer, we use a class Vector<T>.
It has a partial specialization Vector<T&> that acts as a vector of
references.
Internally, the specialization is easily implemented via a member
of type Vector<T*>.
Another line of attack would be to write some sort of proxy class
proxy<T,option> and declare a Vector<proxy<T,option> >. Make the proxy
have implicit conversions to/from references. The value of option would
control the value/reference behavior. I haven't tried this,
so there are probably some gotchas.
Arch D. Robison KAI Software, a division of Intel Americas
arch.robison@intel.com 1906 Fox Drive
(217)-356-2288 Champaign IL 61821
--------------------- Object Oriented Numerics List --------------------------
* To subscribe/unsubscribe: use the handy web form at
http://oonumerics.org/oon/
* If this doesn't work, please send a note to owner-oon-list@oonumerics.org
This archive was generated by hypermail 2b29 : Wed Feb 20 2002 - 03:20:15 EST