
From: "Neal D. Becker" <nbecker@hns.com>
This handy little item, lvalue_cast, would make a useful addition to boost. I didn't write it, and I don't recall who did.
template<class T> inline T& lvalue_cast (const T& rvalue) { return const_cast<T&> (rvalue); }
That's just a different spelling of const_cast. To make it useful, you need to make it more generic: template <typename T> inline T & lvalue_cast(T & value_i) { return value_i; } That, of course, permits you to silently cast away the const-ness of const lvalues. Thus, Daniel Wallin's version, at http://article.gmane.org/gmane.comp.lib.boost.devel/101531, is much better. -- Rob Stewart stewart@sig.com Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer;