summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/tr1
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-31 18:41:33 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-31 18:41:33 +0000
commitc367c0a74dee0a32ab06f7342f3a1779300af767 (patch)
tree85b85c938bcd3f83352e3681784ccac3c8ebf7e8 /libstdc++-v3/include/tr1
parentcded957cb1744f358266b0ed6b2608193ead7d49 (diff)
downloadgcc-c367c0a74dee0a32ab06f7342f3a1779300af767.tar.gz
2010-05-31 Jonathan Wakely <jwakely.gcc@gmail.com>
PR libstdc++/43820 * include/bits/shared_ptr_base.h: Require complete type. * include/tr1/shared_ptr.h: Likewise. * testsuite/20_util/shared_ptr/cons/43820.cc: New. * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820.cc: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160082 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/tr1')
-rw-r--r--libstdc++-v3/include/tr1/shared_ptr.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/libstdc++-v3/include/tr1/shared_ptr.h b/libstdc++-v3/include/tr1/shared_ptr.h
index 6176b5e4814..f504e083c52 100644
--- a/libstdc++-v3/include/tr1/shared_ptr.h
+++ b/libstdc++-v3/include/tr1/shared_ptr.h
@@ -1,6 +1,6 @@
// <tr1/shared_ptr.h> -*- C++ -*-
-// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -367,7 +367,7 @@ namespace tr1
: _M_ptr(__p), _M_refcount(__p)
{
__glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
- // __glibcxx_function_requires(_CompleteConcept<_Tp1*>)
+ typedef int _IsComplete[sizeof(_Tp1)];
__enable_shared_from_this_helper(_M_refcount, __p, __p);
}
@@ -404,9 +404,9 @@ namespace tr1
explicit
__shared_ptr(std::auto_ptr<_Tp1>& __r)
: _M_ptr(__r.get()), _M_refcount()
- {
+ { // TODO requries delete __r.release() well-formed
__glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
- // TODO requires _Tp1 is complete, delete __r.release() well-formed
+ typedef int _IsComplete[sizeof(_Tp1)];
_Tp1* __tmp = __r.get();
_M_refcount = __shared_count<_Lp>(__r);
__enable_shared_from_this_helper(_M_refcount, __tmp, __tmp);