aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Carlini <pcarlini@suse.de>2004-03-20 10:05:48 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2004-03-20 10:05:48 +0000
commit2787b59a7fb5c89ea77439661195565229b4f299 (patch)
tree9cdefe238e47c4a2838dd19024c8ce57c97dc50a
parentdbf833ee1107ad90193bc01c9b073a5f5da1a1b7 (diff)
downloadgcc-2787b59a7fb5c89ea77439661195565229b4f299.zip
gcc-2787b59a7fb5c89ea77439661195565229b4f299.tar.gz
gcc-2787b59a7fb5c89ea77439661195565229b4f299.tar.bz2
std_valarray.h: Document DR389 [Ready].
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
-rw-r--r--libstdc++-v3/ChangeLog5
-rw-r--r--libstdc++-v3/docs/html/ext/howto.html6
-rw-r--r--libstdc++-v3/include/std/std_valarray.h11
3 files changed, 15 insertions, 7 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index fe893b0..5e5b4c8 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -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
diff --git a/libstdc++-v3/docs/html/ext/howto.html b/libstdc++-v3/docs/html/ext/howto.html
index f17c617..56806ca 100644
--- a/libstdc++-v3/docs/html/ext/howto.html
+++ b/libstdc++-v3/docs/html/ext/howto.html
@@ -479,6 +479,12 @@
<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>
diff --git a/libstdc++-v3/include/std/std_valarray.h b/libstdc++-v3/include/std/std_valarray.h
index 1b07843..b893b33 100644
--- a/libstdc++-v3/include/std/std_valarray.h
+++ b/libstdc++-v3/include/std/std_valarray.h
@@ -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:
/**