summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3/include/std/std_valarray.h
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/include/std/std_valarray.h')
-rw-r--r--libstdc++-v3/include/std/std_valarray.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/libstdc++-v3/include/std/std_valarray.h b/libstdc++-v3/include/std/std_valarray.h
index 1b078437452..b893b335415 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:
/**
OpenPOWER on IntegriCloud