stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r489184 - /incubator/stdcxx/trunk/include/rw/_array.h
Date Wed, 20 Dec 2006 19:47:42 GMT
Author: sebor
Date: Wed Dec 20 11:47:42 2006
New Revision: 489184

URL: http://svn.apache.org/viewvc?view=rev&rev=489184
Log:
2006-12-20  Martin Sebor  <sebor@roguewave.com>

	* _array.h (operator[]): Returned a const reference rather than
	value_type to make it possible to implement the resolution of
	LWG issue 389.
	Simplifed a few other expressions and removed redundant formal
	argument names from member function declarations.

Modified:
    incubator/stdcxx/trunk/include/rw/_array.h

Modified: incubator/stdcxx/trunk/include/rw/_array.h
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/rw/_array.h?view=diff&rev=489184&r1=489183&r2=489184
==============================================================================
--- incubator/stdcxx/trunk/include/rw/_array.h (original)
+++ incubator/stdcxx/trunk/include/rw/_array.h Wed Dec 20 11:47:42 2006
@@ -9,16 +9,23 @@
  *
  ***************************************************************************
  *
- * Copyright (c) 1994-2005 Quovadx,  Inc., acting through its  Rogue Wave
- * Software division. Licensed under the Apache License, Version 2.0 (the
- * "License");  you may  not use this file except  in compliance with the
- * License.    You    may   obtain   a   copy   of    the   License    at
- * http://www.apache.org/licenses/LICENSE-2.0.    Unless   required    by
- * applicable law  or agreed to  in writing,  software  distributed under
- * the License is distributed on an "AS IS" BASIS,  WITHOUT WARRANTIES OR
- * CONDITIONS OF  ANY KIND, either  express or implied.  See  the License
- * for the specific language governing permissions  and limitations under
- * the License.
+ * Licensed to the Apache Software  Foundation (ASF) under one or more
+ * contributor  license agreements.  See  the NOTICE  file distributed
+ * with  this  work  for  additional information  regarding  copyright
+ * ownership.   The ASF  licenses this  file to  you under  the Apache
+ * License, Version  2.0 (the  "License"); you may  not use  this file
+ * except in  compliance with the License.   You may obtain  a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the  License is distributed on an  "AS IS" BASIS,
+ * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
+ * implied.   See  the License  for  the  specific language  governing
+ * permissions and limitations under the License.
+ *
+ * Copyright 2000-2006 Rogue Wave Software.
  * 
  **************************************************************************/
 
@@ -58,29 +65,29 @@
     // allocate and initialize from an array
     __rw_array (const_pointer, size_type);
 
-    __rw_array (const __rw_array &__rhs);
+    __rw_array (const __rw_array&);
 
     ~__rw_array () {
         resize (0);
     }
 
-    __rw_array& operator= (const __rw_array &__rhs);
+    __rw_array& operator= (const __rw_array&);
 
     size_type size () const {
         return _C_size;
     }
 
-    value_type operator[] (size_type __inx) const {
+    const_reference operator[] (size_type __inx) const {
         _RWSTD_ASSERT (__inx < size ());
-        return begin () [__inx];
+        return _C_data [__inx];
     }
 
     reference operator[] (size_type __inx) {
         _RWSTD_ASSERT (__inx < size ());
-        return begin () [__inx];
+        return _C_data [__inx];
     }
 
-    void swap (__rw_array &__rhs);
+    void swap (__rw_array&);
 
     pointer begin () {
         return _C_data;
@@ -91,11 +98,11 @@
     }
 
     pointer end () {
-        return begin () + size ();
+        return _C_data + _C_size;
     }
 
     const_pointer end () const {
-        return begin () + size ();
+        return _C_data + _C_size;
     }
 
     void resize (size_type, const_reference = value_type ());



Mime
View raw message