+2004-03-20 Paolo Carlini <pcarlini@suse.de>
+
+ * include/std/std_valarray.h: Document DR389 [Ready].
+ * docs/html/ext/howto.html: Add an entry for DR389.
+
2004-03-19 Michael Eager <eager@mvista.com>
* config/cpu/mips/atomicity.h: Prevent reg loads between LL and
<dd>Change the format string to "%.0Lf".
</dd>
+ <dt><a href="lwg-active.html#389">389</a>:
+ <em>Const overload of valarray::operator[] returns by value</em>
+ </dt>
+ <dd>Change it to return a <code>const T&</code>.
+ </dd>
+
<dt><a href="lwg-active.html#402">402</a>:
<em>Wrong new expression in [some_]allocator::construct</em>
</dt>
operator= (const _Expr<_Dom,_Tp>&);
// _lib.valarray.access_ element access:
- // XXX: LWG to be resolved.
/**
* Return a reference to the i'th array element.
*
- * The C++ spec defines the const version to return Tp instead of
- * the more useful const Tp&. This issue is being reviewed in DR389.
- *
* @param i Index of element to return.
* @return Reference to the i'th element.
*/
- const _Tp& operator[](size_t) const;
+ _Tp& operator[](size_t);
- /// Return a reference to the i'th array element.
- _Tp& operator[](size_t);
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 389. Const overload of valarray::operator[] returns by value.
+ const _Tp& operator[](size_t) const;
// _lib.valarray.sub_ subset operations:
/**