OSDN Git Service

2010-03-03 Paolo Carlini <paolo.carlini@oracle.com>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 3 Mar 2010 11:06:59 +0000 (11:06 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 3 Mar 2010 11:06:59 +0000 (11:06 +0000)
    Jonathan Wakely  <jwakely.gcc@gmail.com>

* include/bits/unique_ptr.h (unique_ptr<>::get_deleter): Simplify
return type.
* testsuite/20_util/unique_ptr/modifiers/reset_neg.cc: Adjust
dg-error line number.
* testsuite/20_util/unique_ptr/assign/assign_neg.cc: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157193 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/unique_ptr.h
libstdc++-v3/testsuite/20_util/unique_ptr/assign/assign_neg.cc
libstdc++-v3/testsuite/20_util/unique_ptr/modifiers/reset_neg.cc

index 3b30270..c70bcf9 100644 (file)
@@ -1,3 +1,12 @@
+2010-03-03  Paolo Carlini  <paolo.carlini@oracle.com>
+           Jonathan Wakely  <jwakely.gcc@gmail.com>
+
+       * include/bits/unique_ptr.h (unique_ptr<>::get_deleter): Simplify
+       return type.
+       * testsuite/20_util/unique_ptr/modifiers/reset_neg.cc: Adjust
+       dg-error line number.
+       * testsuite/20_util/unique_ptr/assign/assign_neg.cc: Likewise.
+
 2010-03-02  Paolo Carlini  <paolo.carlini@oracle.com>
 
        * include/debug/bitset (hash): Minor tweaks.
index 974a5a2..afa3043 100644 (file)
@@ -167,13 +167,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       get() const
       { return std::get<0>(_M_t); }
 
-      typename std::add_lvalue_reference<deleter_type>::type
+      deleter_type&
       get_deleter()
       { return std::get<1>(_M_t); }
 
-      typename std::add_lvalue_reference<
-          typename std::add_const<deleter_type>::type
-              >::type
+      const deleter_type&
       get_deleter() const
       { return std::get<1>(_M_t); }
 
@@ -300,13 +298,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       get() const
       { return std::get<0>(_M_t); }
 
-      typename std::add_lvalue_reference<deleter_type>::type 
+      deleter_type& 
       get_deleter()
       { return std::get<1>(_M_t); }
 
-      typename std::add_lvalue_reference<
-          typename std::add_const<deleter_type>::type
-              >::type 
+      const deleter_type&
       get_deleter() const
       { return std::get<1>(_M_t); }    
 
index 0916bf6..4bf8e4b 100644 (file)
@@ -49,7 +49,7 @@ test03()
   std::unique_ptr<int[2]> p2 = p1;
 }
 
-// { dg-error "deleted function" "" { target *-*-* } 346 }
+// { dg-error "deleted function" "" { target *-*-* } 342 }
 // { dg-error "used here" "" { target *-*-* } 42 }
 // { dg-error "no matching" "" { target *-*-* } 48 }
 // { dg-warning "candidates are" "" { target *-*-* } 115 }
@@ -57,5 +57,5 @@ test03()
 // { dg-warning "note" "" { target *-*-* } 103 }
 // { dg-warning "note" "" { target *-*-* } 98 }
 // { dg-warning "note" "" { target *-*-* } 92 }
-// { dg-error "deleted function" "" { target *-*-* } 209 }
+// { dg-error "deleted function" "" { target *-*-* } 207 }
 // { dg-error "used here" "" { target *-*-* } 49 }
index f292d65..3308fcb 100644 (file)
@@ -36,4 +36,4 @@ void test01()
 }
 
 // { dg-error "used here" "" { target *-*-* } 35 } 
-// { dg-error "deleted function" "" { target *-*-* } 336 }
+// { dg-error "deleted function" "" { target *-*-* } 332 }