hashtable (identity<>::operator(), [...]): Return by const ref.
authorPeter Doerfler <gcc@pdoerfler.com>
Sat, 13 May 2006 10:49:40 +0000 (10:49 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Sat, 13 May 2006 10:49:40 +0000 (10:49 +0000)
2006-05-13  Peter Doerfler  <gcc@pdoerfler.com>

* include/tr1/hashtable (identity<>::operator(),
extract1st<>::operator()): Return by const ref.

From-SVN: r113737

libstdc++-v3/ChangeLog
libstdc++-v3/include/tr1/hashtable

index 342a71a18a12d62254d9244569e060c025f8176e..cbd081d364f7ddfa90bff7862a077b914a677b44 100644 (file)
@@ -1,3 +1,8 @@
+2006-05-13  Peter Doerfler  <gcc@pdoerfler.com>
+
+       * include/tr1/hashtable (identity<>::operator(),
+       extract1st<>::operator()): Return by const ref.
+
 2006-05-10  Steve Ellcey  <sje@cup.hp.com>
 
        * testsuite/lib/libstdc++.exp (check_v3_target_cxa_atexit):
index ad34a9c9a5950f9529f0ad4c4dfa9e9b16c04708..9455ed6405f1fc2b0da4f599cccd8ac65b1835c6 100644 (file)
@@ -404,7 +404,7 @@ namespace Internal
   template<typename T>
     struct identity
     {
-      T
+      const T&
       operator()(const T& t) const
       { return t; }
     };
@@ -412,7 +412,7 @@ namespace Internal
   template<typename Pair>
     struct extract1st
     {
-      typename Pair::first_type
+      const typename Pair::first_type&
       operator()(const Pair& p) const
       { return p.first; }
     };