std_valarray.h: Document DR389 [Ready].
authorPaolo Carlini <pcarlini@suse.de>
Sat, 20 Mar 2004 10:05:48 +0000 (10:05 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Sat, 20 Mar 2004 10:05:48 +0000 (10:05 +0000)
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.

From-SVN: r79733

libstdc++-v3/ChangeLog
libstdc++-v3/docs/html/ext/howto.html
libstdc++-v3/include/std/std_valarray.h

index fe893b043dcaebf8dc79df0e2c834ade0e5f04ac..5e5b4c82134c2aaeb32ec7ec0a4eeed1b0c58e67 100644 (file)
@@ -1,3 +1,8 @@
+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
index f17c6173c08a6222fdc926d1ebd1ecf8f755f0f3..56806ca436d929715e8819f019d5ff83861200bf 100644 (file)
     <dd>Change the format string to &quot;%.0Lf&quot;.
     </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&amp;</code>.
+    </dd>
+
     <dt><a href="lwg-active.html#402">402</a>:
         <em>Wrong new expression in [some_]allocator::construct</em>
     </dt>
index 1b0784374528627e5bcb637d3e48df01ad1d35a5..b893b33541591e7627911649edb92f1134892ffe 100644 (file)
@@ -214,20 +214,17 @@ namespace std
        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:
       /**