stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject svn commit: r661478 - in /stdcxx/branches/4.3.x: etc/config/src/ include/ include/ansi/ include/rw/ include/tr1/ tests/support/ tests/tr1.c99/ tests/tr1.util/ tests/utilities/
Date Thu, 29 May 2008 20:58:22 GMT
Author: vitek
Date: Thu May 29 13:58:21 2008
New Revision: 661478

URL: http://svn.apache.org/viewvc?rev=661478&view=rev
Log:

2008-05-29  Travis Vitek  <vitek@roguewave.com>

	* etc/config/src/headers.inc: Add checks for more C99 headers.
	* include/tr1/_smartptr.h: Moved to include/rw/_smartptr.h
	* include/tr1/cstdint: Moved to include/ansi/_cstdint.h
	* include/tr1/stdint.h: Moved to include/ansi/stdint.h
	* include/tr1/array: Moved to include/array
	* tests/tr1.util/2.smartptr.shared.cpp: Moved to
	tests/utilities/20.smartptr.shared.cpp.
	* tests/tr1.util/2.smartptr.weak.cpp: Moved to
	tests/utilities/20.smartptr.weak.cpp.
	* include/ansi/cstdint: Add new file.
	* tests/tr1.c99/8.cstdint.cpp: Moved to tests/support/18.cstdint.cpp
	* include/rw/_smartptr.h: Removed all mention of TR1, updated section
	numbers to section names as appropriate.
	* include/array: Ditto.
	* include/ansi/stdint.h: Ditto.
	* include/ansi/_cstdint.h: Ditto.
	* tests/utilities/20.smartptr.shared.cpp: Ditto.
	[_RWSTD_NO_EXT_CXX_0X]: Reduce test to a warning if c++0x extensions
	are disabled.
	* tests/utilities/20.smartptr.weak.cpp: Ditto.
	* tests/support/18.cstdint.cpp: Ditto.
	


Added:
    stdcxx/branches/4.3.x/include/ansi/_cstdint.h
      - copied, changed from r660359, stdcxx/branches/4.3.x/include/tr1/cstdint
    stdcxx/branches/4.3.x/include/ansi/cstdint   (with props)
    stdcxx/branches/4.3.x/include/ansi/stdint.h
      - copied, changed from r660359, stdcxx/branches/4.3.x/include/tr1/stdint.h
    stdcxx/branches/4.3.x/include/array
      - copied, changed from r660359, stdcxx/branches/4.3.x/include/tr1/array
    stdcxx/branches/4.3.x/include/rw/_smartptr.h
      - copied, changed from r660359, stdcxx/branches/4.3.x/include/tr1/_smartptr.h
    stdcxx/branches/4.3.x/tests/support/18.cstdint.cpp
      - copied, changed from r661104, stdcxx/branches/4.3.x/tests/tr1.c99/8.cstdint.cpp
    stdcxx/branches/4.3.x/tests/utilities/20.smartptr.shared.cpp
      - copied, changed from r661104, stdcxx/branches/4.3.x/tests/tr1.util/2.smartptr.shared.cpp
    stdcxx/branches/4.3.x/tests/utilities/20.smartptr.weak.cpp
      - copied, changed from r661104, stdcxx/branches/4.3.x/tests/tr1.util/2.smartptr.weak.cpp
Removed:
    stdcxx/branches/4.3.x/include/tr1/_smartptr.h
    stdcxx/branches/4.3.x/include/tr1/array
    stdcxx/branches/4.3.x/include/tr1/cstdint
    stdcxx/branches/4.3.x/include/tr1/stdint.h
    stdcxx/branches/4.3.x/tests/tr1.c99/8.cstdint.cpp
    stdcxx/branches/4.3.x/tests/tr1.util/2.smartptr.shared.cpp
    stdcxx/branches/4.3.x/tests/tr1.util/2.smartptr.weak.cpp
Modified:
    stdcxx/branches/4.3.x/etc/config/src/headers.inc

Modified: stdcxx/branches/4.3.x/etc/config/src/headers.inc
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/etc/config/src/headers.inc?rev=661478&r1=661477&r2=661478&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/etc/config/src/headers.inc (original)
+++ stdcxx/branches/4.3.x/etc/config/src/headers.inc Thu May 29 13:58:21 2008
@@ -21,8 +21,10 @@
 ##############################################################################
 
 # list of headers
-hdrs="assert ctype errno float iso646 limits locale math setjmp signal       \
-      stdarg stddef stdio stdlib string time wchar wctype new typeinfo"
+hdrs="assert complex ctype errno fenv float inttypes iso646 limits locale    \
+      math setjmp signal stdarg stdbool stddef stdio stdint stdlib string    \
+      tgmath time uchar wchar wctype new typeinfo"
+
 hdrs="$hdrs ieeefp.h pthread.h"
 
 

Copied: stdcxx/branches/4.3.x/include/ansi/_cstdint.h (from r660359, stdcxx/branches/4.3.x/include/tr1/cstdint)
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/ansi/_cstdint.h?p2=stdcxx/branches/4.3.x/include/ansi/_cstdint.h&p1=stdcxx/branches/4.3.x/include/tr1/cstdint&r1=660359&r2=661478&rev=661478&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/include/tr1/cstdint (original)
+++ stdcxx/branches/4.3.x/include/ansi/_cstdint.h Thu May 29 13:58:21 2008
@@ -27,8 +27,8 @@
  * 
  **************************************************************************/
 
-#ifndef _RWSTD_TR1_CSTDINT_INCLUDED
-#define _RWSTD_TR1_CSTDINT_INCLUDED
+#ifndef _RWSTD_CSTDINT_H_INCLUDED
+#define _RWSTD_CSTDINT_H_INCLUDED
 
 
 #include <rw/_defs.h>
@@ -36,8 +36,6 @@
 
 _RWSTD_NAMESPACE (std) {
 
-_RWSTD_NAMESPACE (tr1) {
-
 #ifndef _RWSTD_BNO_TWOS_COMPLEMENT
 #  define _RWSTD_T_MIN(tmax)   (-(tmax) - 1)
 #else
@@ -351,9 +349,7 @@
 #define INT_FAST32_MIN      _RWSTD_T_MIN (INT_FAST32_MAX)
 #define INT_FAST64_MIN      _RWSTD_T_MIN (INT_FAST64_MAX)
 
-}   // namespace tr1
-
 }   // namespace std
 
 
-#endif   // _RWSTD_TR1_CSTDINT_INCLUDED
+#endif   // _RWSTD_CSTDINT_H_INCLUDED

Added: stdcxx/branches/4.3.x/include/ansi/cstdint
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/ansi/cstdint?rev=661478&view=auto
==============================================================================
--- stdcxx/branches/4.3.x/include/ansi/cstdint (added)
+++ stdcxx/branches/4.3.x/include/ansi/cstdint Thu May 29 13:58:21 2008
@@ -0,0 +1,174 @@
+// -*- C++ -*-
+/***************************************************************************
+ *
+ * cstdint - C++ Standard library interface to the ANSI C header stdint.h
+ *
+ * $Id$
+ *
+ ***************************************************************************
+ *
+ * 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 1994-2006 Rogue Wave Software.
+ * 
+ **************************************************************************/
+
+#include <rw/_defs.h>
+
+#ifdef _RWSTD_NO_EXT_CXX_0X
+#  error _RWSTD_NO_EXT_CXX_0X defined and C++0x header included
+#endif
+
+#ifndef _RWSTD_NO_PURE_C_HEADERS
+#  include <ansi/_cstdint.h>
+#else
+
+#ifdef _RWSTD_OS_LINUX
+   // stdint.h doesn't define any of the expected macros unless
+   // the following macro is defined before it is included
+#  define __STDC_LIMIT_MACROS
+#endif   // _RWSTD_OS_LINUX
+
+#ifndef _RWSTD_NO_DEPRECATED_C_HEADERS
+
+#ifndef _RWSTD_NAMESPACE_STD_OPEN
+#define _RWSTD_NAMESPACE_STD_OPEN 19
+
+_RWSTD_NAMESPACE (std) { 
+
+#endif   // _RWSTD_NAMESPACE_STD_OPEN
+
+#include _RWSTD_ANSI_C_STDINT_H
+
+
+#if _RWSTD_NAMESPACE_STD_OPEN == 19
+#  undef _RWSTD_NAMESPACE_STD_OPEN
+
+}   // namespace std
+
+#endif   // _RWSTD_NAMESPACE_STD_OPEN == 19
+
+#else   // if defined (_RWSTD_NO_DEPRECATED_C_HEADERS)
+
+#ifndef _RWSTD_CSTDINT_INCLUDED
+#define _RWSTD_CSTDINT_INCLUDED
+
+#include _RWSTD_ANSI_C_STDINT_H
+
+#if !defined (_RWSTD_NO_NAMESPACE) && !defined (_RWSTD_NO_HONOR_STD) && \
+    !defined (_RWSTD_NO_USING_LIBC_IN_STD)
+
+namespace std {
+
+#ifdef _RWSTD_INT8_T
+    using ::int8_t;
+#endif   // _RWSTD_INT8_T
+
+#ifdef _RWSTD_UINT8_T
+    using ::uint8_t;
+#endif   // _RWSTD_UINT8_T
+
+#ifdef _RWSTD_INT16_T
+    using ::int16_t;
+#endif   // _RWSTD_INT16_T
+
+#ifdef _RWSTD_UINT16_T
+    using ::uint16_t;
+#endif   // _RWSTD_UINT16_T
+
+#ifdef _RWSTD_INT32_T
+    using ::int32_t;
+#endif   // _RWSTD_INT32_T
+
+#ifdef _RWSTD_UINT32_T
+    using ::uint32_t;
+#endif   // _RWSTD_UINT32_T
+
+#ifdef _RWSTD_INT64_T
+    using ::int64_t;
+#endif   // _RWSTD_INT64_T
+
+#ifdef _RWSTD_UINT64_T
+    using ::uint64_t;
+#endif   // _RWSTD_UINT64_T
+
+    using ::intmax_t;
+    using ::uintmax_t;
+
+    using ::intptr_t;
+    using ::uintptr_t;
+
+#ifdef _RWSTD_INT_LEAST8_T
+    using ::int_least8_t;
+    using ::int_fast8_t;
+#endif   // _RWSTD_INT_LEAST8_T
+
+#ifdef _RWSTD_UINT_LEAST8_T
+    using ::uint_least8_t;
+    using ::uint_fast8_t;
+#endif   // _RWSTD_UINT_LEAST8_T
+
+#ifdef _RWSTD_INT_LEAST16_T
+    using ::int_least16_t;
+    using ::int_fast16_t;
+#endif   // _RWSTD_UINT_LEAST16_T
+
+#ifdef _RWSTD_UINT_LEAST16_T
+    using ::uint_least16_t;
+    using ::uint_fast16_t;
+#endif   // _RWSTD_UINT_LEAST16_T
+
+#ifdef _RWSTD_INT_LEAST32_T
+    using ::int_least32_t;
+    using ::int_fast32_t;
+#endif   // _RWSTD_UINT_LEAST32_T
+
+#ifdef _RWSTD_UINT_LEAST32_T
+    using ::uint_least32_t;
+    using ::uint_fast32_t;
+#endif   // _RWSTD_UINT_LEAST32_T
+
+#ifdef _RWSTD_INT_LEAST64_T
+    using ::int_least64_t;
+    using ::int_fast64_t;
+#endif   // _RWSTD_INT_LEAST64_T
+
+#ifdef _RWSTD_UINT_LEAST64_T
+    using ::uint_least64_t;
+    using ::uint_fast64_t;
+#endif   // _RWSTD_UINT_LEAST64_T
+
+#ifdef _RWSTD_INT_LEAST128_T
+    using ::int_least128_t;
+    using ::int_fast128_t;
+#endif   // _RWSTD_INT_LEAST128_T
+
+#ifdef _RWSTD_UINT_LEAST128_T
+    using ::uint_least128_t;
+    using ::uint_fast128_t;
+#endif   // _RWSTD_UINT_LEAST128_T
+
+}   // std
+
+#endif   // !_RWSTD_NO_NAMESPACE && !_RWSTD_NO_HONOR_STD && !_RWSTD_NO_USING_LIBC_IN_STD
+
+#endif   // _RWSTD_CSTDINT_INCLUDED
+
+#endif   // _RWSTD_NO_DEPRECATED_C_HEADERS
+
+#endif   // _RWSTD_NO_PURE_C_HEADERS
+

Propchange: stdcxx/branches/4.3.x/include/ansi/cstdint
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: stdcxx/branches/4.3.x/include/ansi/cstdint
------------------------------------------------------------------------------
    svn:keywords = Id

Copied: stdcxx/branches/4.3.x/include/ansi/stdint.h (from r660359, stdcxx/branches/4.3.x/include/tr1/stdint.h)
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/ansi/stdint.h?p2=stdcxx/branches/4.3.x/include/ansi/stdint.h&p1=stdcxx/branches/4.3.x/include/tr1/stdint.h&r1=660359&r2=661478&rev=661478&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/include/tr1/stdint.h (original)
+++ stdcxx/branches/4.3.x/include/ansi/stdint.h Thu May 29 13:58:21 2008
@@ -27,73 +27,79 @@
  * 
  **************************************************************************/
 
-#ifndef _RWSTD_TR1_STDINT_H_INCLUDED
-#define _RWSTD_TR1_STDINT_H_INCLUDED
+#include <rw/_defs.h>
 
+#ifndef _RWSTD_NO_DEPRECATED_C_HEADERS
 
-#include <tr1/cstdint>
-#include <rw/_defs.h>
+#  ifndef _RWSTD_STDINT_H_INCLUDED
+#    define _RWSTD_STDINT_H_INCLUDED
+
+#    include <ansi/cstdint>
 
+#    ifndef _RWSTD_NO_NAMESPACE
 
 #ifdef _RWSTD_INT8_T
 
 // optional exact-width types
-_USING (std::tr1::int8_t);
-_USING (std::tr1::uint8_t);
+_USING (std::int8_t);
+_USING (std::uint8_t);
 
 #endif   // _RWSTD_INT8_T
 
-_USING (std::tr1::int_least8_t);
-_USING (std::tr1::uint_least8_t);
-_USING (std::tr1::int_fast8_t);
-_USING (std::tr1::uint_fast8_t);
+_USING (std::int_least8_t);
+_USING (std::uint_least8_t);
+_USING (std::int_fast8_t);
+_USING (std::uint_fast8_t);
 
 
 #ifdef _RWSTD_INT16_T
 
 // optional exact-width types
-_USING (std::tr1::int16_t);
-_USING (std::tr1::uint16_t);
+_USING (std::int16_t);
+_USING (std::uint16_t);
 
 #endif   // _RWSTD_INT16_T
 
-_USING (std::tr1::int_least16_t);
-_USING (std::tr1::uint_least16_t);
-_USING (std::tr1::int_fast16_t);
-_USING (std::tr1::uint_fast16_t);
+_USING (std::int_least16_t);
+_USING (std::uint_least16_t);
+_USING (std::int_fast16_t);
+_USING (std::uint_fast16_t);
 
 
 #ifdef _RWSTD_INT32_T
 
 // optional exact-width types
-_USING (std::tr1::int32_t);
-_USING (std::tr1::uint32_t);
+_USING (std::int32_t);
+_USING (std::uint32_t);
 
 #endif   // _RWSTD_INT32_T
 
-_USING (std::tr1::int_least32_t);
-_USING (std::tr1::uint_least32_t);
-_USING (std::tr1::int_fast32_t);
-_USING (std::tr1::uint_fast32_t);
+_USING (std::int_least32_t);
+_USING (std::uint_least32_t);
+_USING (std::int_fast32_t);
+_USING (std::uint_fast32_t);
 
 
 #ifdef _RWSTD_INT64_T
 
 // optional exact-width types
-_USING (std::tr1::int64_t);
-_USING (std::tr1::uint64_t);
+_USING (std::int64_t);
+_USING (std::uint64_t);
 
 #endif   // _RWSTD_INT64_T
 
-_USING (std::tr1::int_least64_t);
-_USING (std::tr1::uint_least64_t);
-_USING (std::tr1::int_fast64_t);
-_USING (std::tr1::uint_fast64_t);
-
-_USING (std::tr1::intmax_t);
-_USING (std::tr1::uintmax_t);
-_USING (std::tr1::intptr_t);
-_USING (std::tr1::uintptr_t);
-
-
-#endif   // _RWSTD_TR1_STDINT_H_INCLUDED
+_USING (std::int_least64_t);
+_USING (std::uint_least64_t);
+_USING (std::int_fast64_t);
+_USING (std::uint_fast64_t);
+
+_USING (std::intmax_t);
+_USING (std::uintmax_t);
+_USING (std::intptr_t);
+_USING (std::uintptr_t);
+
+#    endif   // _RWSTD_NO_NAMESPACE
+#  endif   // _RWSTD_STDINT_H_INCLUDED
+#else
+#  include _RWSTD_ANSI_C_STDINT_H
+#endif   // _RWSTD_NO_DEPRECATED_C_HEADERS

Copied: stdcxx/branches/4.3.x/include/array (from r660359, stdcxx/branches/4.3.x/include/tr1/array)
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/array?p2=stdcxx/branches/4.3.x/include/array&p1=stdcxx/branches/4.3.x/include/tr1/array&r1=660359&r2=661478&rev=661478&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/include/tr1/array (original)
+++ stdcxx/branches/4.3.x/include/array Thu May 29 13:58:21 2008
@@ -27,22 +27,23 @@
  * 
  **************************************************************************/
 
-#ifndef _RWSTD_TR1_ARRAY_INCLUDED
-#define _RWSTD_TR1_ARRAY_INCLUDED
+#ifndef _RWSTD_ARRAY_INCLUDED
+#define _RWSTD_ARRAY_INCLUDED
 
+#include <rw/_defs.h>
+
+#ifdef _RWSTD_NO_EXT_CXX_0X
+#  error _RWSTD_NO_EXT_CXX_0X defined and C++0x header included
+#endif   // _RWSTD_NO_EXT_CXX_0X
 
 #include <rw/_algobase.h>
 #include <rw/_error.h>
 #include <rw/_iterator.h>
-#include <rw/_defs.h>
 
 
 _RWSTD_NAMESPACE (std) {
 
-_RWSTD_NAMESPACE (tr1) {
-
-
-// 6.2.2 -- class template array
+// [array] -- class template array
 template <class _TypeT, _RWSTD_SIZE_T _Size>
 struct array
 {
@@ -335,7 +336,7 @@
 }
 
 
-// 6.2.2.2 -- specialized algorithms
+// [array.special] -- specialized algorithms
 template <class _TypeT, _RWSTD_SIZE_T _Size >
 inline void
 swap (array<_TypeT, _Size> &__lhs, array<_TypeT, _Size> &__rhs)
@@ -344,12 +345,12 @@
 }
 
 
-// 6.2.2.5 -- tuple interface to class template array
+// [array.tuple] -- tuple interface to class template array
 template <class _TypeT>
-class tuple_size;   // defined in <tr1/tuple>
+class tuple_size;   // defined in <tuple>
 
 template <int I, class _TypeT>
-class tuple_element;   // defined in <tr1/tuple>
+class tuple_element;   // defined in <tuple>
 
 template <class _TypeT, _RWSTD_SIZE_T _Size>
 struct tuple_size<array<_TypeT, _Size> >;
@@ -363,10 +364,7 @@
 template <int I, class _TypeT, _RWSTD_SIZE_T _Size>
 const _TypeT& get (const array<_TypeT, _Size>&);
 
-
-}   // namespace tr1
-
 }   // namespace std
 
+#endif   // _RWSTD_ARRAY_INCLUDED
 
-#endif   // _RWSTD_TR1_ARRAY_INCLUDED

Copied: stdcxx/branches/4.3.x/include/rw/_smartptr.h (from r660359, stdcxx/branches/4.3.x/include/tr1/_smartptr.h)
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_smartptr.h?p2=stdcxx/branches/4.3.x/include/rw/_smartptr.h&p1=stdcxx/branches/4.3.x/include/tr1/_smartptr.h&r1=660359&r2=661478&rev=661478&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/include/tr1/_smartptr.h (original)
+++ stdcxx/branches/4.3.x/include/rw/_smartptr.h Thu May 29 13:58:21 2008
@@ -27,8 +27,8 @@
  * 
  **************************************************************************/
 
-#ifndef _RWSTD_TR1_SMARTPTR_INCLUDED
-#define _RWSTD_TR1_SMARTPTR_INCLUDED
+#ifndef _RWSTD_SMARTPTR_INCLUDED
+#define _RWSTD_SMARTPTR_INCLUDED
 
 
 #include <rw/_autoptr.h>
@@ -143,10 +143,8 @@
 
 _RWSTD_NAMESPACE (std) {
 
-_RWSTD_NAMESPACE (tr1) {
 
-
-// 2.2.2 - class bad_weak_ptr
+// [util.smartptr.weakptr] - class bad_weak_ptr
 struct bad_weak_ptr: _RW::__rw_exception
 {
     bad_weak_ptr (): _RW::__rw_exception () { }
@@ -157,7 +155,7 @@
 class weak_ptr;
 
 
-// 2.2.3 - class template shared_ptr
+// [util.smartptr.shared] - class template shared_ptr
 template <class _TypeT>
 class shared_ptr
 {
@@ -190,7 +188,7 @@
 
     typedef _TypeT element_type;
 
-    // [2.2.3.1] constructors
+    // [util.smartptr.shared.const] constructors
 
     shared_ptr (): _C_pbody (0), _C_ptr (0) { }
 
@@ -233,7 +231,7 @@
     _EXPLICIT
     shared_ptr (auto_ptr<_TypeU>&);
 
-    // [2.2.3.2] destructor
+    // [util.smartptr.shared.dest] destructor
     ~shared_ptr () {
         if (_C_pbody)
             _C_pbody->_C_unref ();
@@ -244,7 +242,7 @@
 #endif   // _RWSTDDEBUG
     }
 
-    // [2.2.3.3] assignment
+    // [util.smartptr.shared.assign] assignment
 
     shared_ptr& operator= (const shared_ptr &__rhs) {
         if (__rhs._C_pbody)
@@ -279,7 +277,7 @@
         return *this;
     }
 
-    // [2.2.3.4] modifiers
+    // [util.smartptr.shared.mod] modifiers
 
     void swap (shared_ptr &__other) {
         _C_base* const __body = _C_pbody;
@@ -308,7 +306,7 @@
         shared_ptr<_TypeU>(__ptr, __del).swap (*this);
     }
 
-    // [2.2.3.5] observers
+    // [util.smartptr.shared.obs] observers
 
     element_type* get () const {
         return _C_ptr;
@@ -355,7 +353,7 @@
 };
 
 
-// 2.2.3.6 - shared_ptr comparisons
+// [util.smartptr.shared.cmp] - shared_ptr comparisons
 template <class _TypeT, class _TypeU>
 inline bool
 operator== (const shared_ptr<_TypeT> &__lhs, const shared_ptr<_TypeU> &__rhs)
@@ -380,7 +378,7 @@
 }
 
 
-// 2.2.3.8 - shared_ptr specialized algorithms
+// [util.smartptr.shared.spec] - shared_ptr specialized algorithms
 template <class _TypeT>
 inline void
 swap (shared_ptr<_TypeT> &__lhs, shared_ptr<_TypeT> &__rhs)
@@ -389,7 +387,7 @@
 }
 
 
-// 2.2.3.9 - shared_ptr casts
+// [util.smartptr.shared.cast] - shared_ptr casts
 template <class _TypeT, class _TypeU>
 inline shared_ptr<_TypeT>
 static_pointer_cast (const shared_ptr<_TypeU> &__src)
@@ -428,7 +426,7 @@
 
 #if 0   // NOT IMPLEMENTED YET
 
-// 2.2.3.7 - shared_ptr I/O
+// [util.smartptr.shared.io] - shared_ptr I/O
 template <class _CharT, class _Traits, class _TypeT>
 inline basic_ostream<_CharT, _TypeT>&
 operator<< (basic_ostream<_CharT, _Traits>&, const shared_ptr<_TypeT>&);
@@ -436,7 +434,7 @@
 #endif   // 0/1
 
 
-// 2.2.3.10 - shared_ptr get_deleter
+// [util.smartptr.shared.getdeleter] - shared_ptr get_deleter
 template <class _Deleter, class _TypeT>
 _Deleter*
 get_deleter (const shared_ptr<_TypeT> &__ptr)
@@ -445,7 +443,7 @@
 }
 
 
-// 2.2.4 - class template weak_ptr
+// [util.smartptr.weak] - class template weak_ptr
 template <class _TypeT>
 class weak_ptr
 {
@@ -566,7 +564,7 @@
                           : shared_ptr<element_type>(*this);
     }
 
-    // implements 2.2.4.6 - non-member template operator<
+    // implements 20.6.12.3.6 - non-member template operator<
     template <class _TypeU>
     bool operator< (const weak_ptr<_TypeU> __rhs) const {
         return _C_pbody < __rhs._C_pbody;
@@ -580,7 +578,7 @@
 };
 
 
-// 2.2.4.6 - weak_ptr comparison
+// [util.smartptr.weak.cmp] - weak_ptr comparison
 template <class _TypeT, class _TypeU>
 inline bool
 operator< (const weak_ptr<_TypeT> &__lhs, const weak_ptr<_TypeU> &__rhs)
@@ -589,7 +587,7 @@
 }
 
 
-// 2.2.4.7 - weak_ptr specialized algorithms
+// [util.smartptr.weak.spec] - weak_ptr specialized algorithms
 template <class _TypeT>
 inline void
 swap (weak_ptr<_TypeT> &__lhs, weak_ptr<_TypeT> &__rhs)
@@ -598,14 +596,12 @@
 }
 
 
-// 2.2.5 - class enable_shared_from_this
+// [util.smartptr.enab] - class enable_shared_from_this
 template <class _TypeT>
 class enable_shared_from_this;
 
 
-}   // namespace tr1
-
 }   // namespace std
 
 
-#endif   // _RWSTD_TR1_SMARTPTR_INCLUDED
+#endif   // _RWSTD_SMARTPTR_INCLUDED

Copied: stdcxx/branches/4.3.x/tests/support/18.cstdint.cpp (from r661104, stdcxx/branches/4.3.x/tests/tr1.c99/8.cstdint.cpp)
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/support/18.cstdint.cpp?p2=stdcxx/branches/4.3.x/tests/support/18.cstdint.cpp&p1=stdcxx/branches/4.3.x/tests/tr1.c99/8.cstdint.cpp&r1=661104&r2=661478&rev=661478&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/tr1.c99/8.cstdint.cpp (original)
+++ stdcxx/branches/4.3.x/tests/support/18.cstdint.cpp Thu May 29 13:58:21 2008
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 /***************************************************************************
  *
- * 8.cstdint.cpp - test exercising tr.c99.cstdint
+ * 18.cstdint.cpp - test exercising cstdint
  *
  * $Id$
  *
@@ -23,11 +23,12 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 2006 Rogue Wave Software.
+ * Copyright 1994-2008 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
-enum {
+
+enum macros {
     // these are expected to be hidden by macros #defined in <cstdint>
     // #included below; references to macros that are not #defined in
     // the header will silently use these enumerators and prevent
@@ -67,10 +68,13 @@
 };
 
 
-#include <tr1/cstdint>
-
 #include <driver.h>
 
+#ifndef _RWSTD_NO_EXT_CXX_0X
+
+#include <ansi/cstdint>
+
+
 /**************************************************************************/
 
 static int rw_opt_no_macros;   // for --no-macros
@@ -401,14 +405,12 @@
 // define test functions in namespace std to detect the presece
 // or absence of the required types
 
-namespace tr1 {
-
 namespace Nested {
 
 using namespace Fallback;
 
-// each test_xxx_t typedef aliases std::tr1::xxx_t if the corresponding
-// type is defined in namespace std::tr1, or Fallback::xxx_t otherwise
+// each test_xxx_t typedef aliases std::xxx_t if the corresponding
+// type is defined in namespace std, or Fallback::xxx_t otherwise
 
 typedef int8_t         test_int8_t;
 typedef uint8_t        test_uint8_t;
@@ -445,42 +447,40 @@
 
 }   // namespace Nested
 
-}   // namespace tr1
-
 }   // namespace std
 
-typedef std::tr1::Nested::test_int8_t         test_int8_t;
-typedef std::tr1::Nested::test_uint8_t        test_uint8_t;
-typedef std::tr1::Nested::test_int_least8_t   test_int_least8_t;
-typedef std::tr1::Nested::test_uint_least8_t  test_uint_least8_t;
-typedef std::tr1::Nested::test_int_fast8_t    test_int_fast8_t;
-typedef std::tr1::Nested::test_uint_fast8_t   test_uint_fast8_t;
-
-typedef std::tr1::Nested::test_int16_t        test_int16_t;
-typedef std::tr1::Nested::test_uint16_t       test_uint16_t;
-typedef std::tr1::Nested::test_int_least16_t  test_int_least16_t;
-typedef std::tr1::Nested::test_uint_least16_t test_uint_least16_t;
-typedef std::tr1::Nested::test_int_fast16_t   test_int_fast16_t;
-typedef std::tr1::Nested::test_uint_fast16_t  test_uint_fast16_t;
-
-typedef std::tr1::Nested::test_int32_t        test_int32_t;
-typedef std::tr1::Nested::test_uint32_t       test_uint32_t;
-typedef std::tr1::Nested::test_int_least32_t  test_int_least32_t;
-typedef std::tr1::Nested::test_uint_least32_t test_uint_least32_t;
-typedef std::tr1::Nested::test_int_fast32_t   test_int_fast32_t;
-typedef std::tr1::Nested::test_uint_fast32_t  test_uint_fast32_t;
-
-typedef std::tr1::Nested::test_int64_t        test_int64_t;
-typedef std::tr1::Nested::test_uint64_t       test_uint64_t;
-typedef std::tr1::Nested::test_int_least64_t  test_int_least64_t;
-typedef std::tr1::Nested::test_uint_least64_t test_uint_least64_t;
-typedef std::tr1::Nested::test_int_fast64_t   test_int_fast64_t;
-typedef std::tr1::Nested::test_uint_fast64_t  test_uint_fast64_t;
-
-typedef std::tr1::Nested::test_intmax_t       test_intmax_t;
-typedef std::tr1::Nested::test_uintmax_t      test_uintmax_t;
-typedef std::tr1::Nested::test_intptr_t       test_intptr_t;
-typedef std::tr1::Nested::test_uintptr_t      test_uintptr_t;
+typedef std::Nested::test_int8_t         test_int8_t;
+typedef std::Nested::test_uint8_t        test_uint8_t;
+typedef std::Nested::test_int_least8_t   test_int_least8_t;
+typedef std::Nested::test_uint_least8_t  test_uint_least8_t;
+typedef std::Nested::test_int_fast8_t    test_int_fast8_t;
+typedef std::Nested::test_uint_fast8_t   test_uint_fast8_t;
+
+typedef std::Nested::test_int16_t        test_int16_t;
+typedef std::Nested::test_uint16_t       test_uint16_t;
+typedef std::Nested::test_int_least16_t  test_int_least16_t;
+typedef std::Nested::test_uint_least16_t test_uint_least16_t;
+typedef std::Nested::test_int_fast16_t   test_int_fast16_t;
+typedef std::Nested::test_uint_fast16_t  test_uint_fast16_t;
+
+typedef std::Nested::test_int32_t        test_int32_t;
+typedef std::Nested::test_uint32_t       test_uint32_t;
+typedef std::Nested::test_int_least32_t  test_int_least32_t;
+typedef std::Nested::test_uint_least32_t test_uint_least32_t;
+typedef std::Nested::test_int_fast32_t   test_int_fast32_t;
+typedef std::Nested::test_uint_fast32_t  test_uint_fast32_t;
+
+typedef std::Nested::test_int64_t        test_int64_t;
+typedef std::Nested::test_uint64_t       test_uint64_t;
+typedef std::Nested::test_int_least64_t  test_int_least64_t;
+typedef std::Nested::test_uint_least64_t test_uint_least64_t;
+typedef std::Nested::test_int_fast64_t   test_int_fast64_t;
+typedef std::Nested::test_uint_fast64_t  test_uint_fast64_t;
+
+typedef std::Nested::test_intmax_t       test_intmax_t;
+typedef std::Nested::test_uintmax_t      test_uintmax_t;
+typedef std::Nested::test_intptr_t       test_intptr_t;
+typedef std::Nested::test_uintptr_t      test_uintptr_t;
 
 /**************************************************************************/
 
@@ -495,8 +495,8 @@
 {
     static volatile intT zero         = intT (0);
     static volatile intT one          = intT (1);
-    static volatile intT minus_one    = zero - one;
-    static volatile intT all_bits_set = ~zero;
+    static volatile intT minus_one    = intT (zero - one);
+    static volatile intT all_bits_set = intT (~zero);
 
     const bool is_signed = minus_one < zero;
 
@@ -515,8 +515,8 @@
         else
             break;
 
-        maximum = maximum * intT (2);
-        minimum = maximum * intT (2);
+        maximum = intT (maximum * 2);
+        minimum = intT (maximum * 2);
     }
 
     if (macro_name) {
@@ -568,12 +568,12 @@
 {
 #define TEST_REQUIRED_TYPE(name, bits, exact)                           \
     do {                                                                \
-        rw_info (0, 0, __LINE__, "std::tr1::%s (required)", # name);    \
+        rw_info (0, 0, __LINE__, "std::%s (required)", # name);         \
         const bool type_defined =                                       \
             sizeof (test_ ## name) != sizeof (Fallback::name);          \
         rw_assert (type_defined, 0, __LINE__,                           \
                    "required type %s not defined in namespace "         \
-                   "std::tr1", #name);                                  \
+                   "std", #name);                                       \
         if (type_defined)                                               \
             test_bits (__LINE__, test_ ## name (0),                     \
                        bits, exact, #name);                             \
@@ -581,12 +581,12 @@
 
 #define TEST_OPTIONAL_TYPE(name, bits, exact)                           \
     do {                                                                \
-        rw_info (0, 0, __LINE__, "std::tr1::%s (optional)", # name);    \
+        rw_info (0, 0, __LINE__, "std::%s (optional)", # name);         \
         const bool type_defined =                                       \
             sizeof (test_ ## name) != sizeof (Fallback::name);          \
         rw_warn (type_defined, 0, __LINE__,                             \
                  "optional type %s not defined in namespace "           \
-                 "std::tr1", #name);                                    \
+                 "std", #name);                                         \
         if (type_defined)                                               \
             test_bits (__LINE__, test_ ## name (0),                     \
                        bits, exact, #name);                             \
@@ -758,7 +758,7 @@
 int main (int argc, char *argv[])
 {
     return rw_test (argc, argv, __FILE__,
-                    "tr.c99.cstdint",
+                    "cstdint",
                     0 /* no comment */,
                     run_test,
                     "|-no-macros# "
@@ -768,3 +768,24 @@
                     &rw_opt_no_types,
                     &rw_opt_no_64_bit);
 }
+
+#else    // _RWSTD_NO_CXX_0X
+
+static int
+run_test (int, char*[])
+{
+    rw_warn (0, 0, __LINE__,
+	         "test disabled because _RWSTD_NO_EXT_CXX_0X is defined");
+    return 0;
+}
+
+int main (int argc, char *argv[])
+{
+    return rw_test (argc, argv, __FILE__,
+                    "cstdint",
+                    0 /* no comment */,
+                    run_test,
+                    0);
+}
+
+#endif   // _RWSTD_NO_CXX_0X

Copied: stdcxx/branches/4.3.x/tests/utilities/20.smartptr.shared.cpp (from r661104, stdcxx/branches/4.3.x/tests/tr1.util/2.smartptr.shared.cpp)
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/utilities/20.smartptr.shared.cpp?p2=stdcxx/branches/4.3.x/tests/utilities/20.smartptr.shared.cpp&p1=stdcxx/branches/4.3.x/tests/tr1.util/2.smartptr.shared.cpp&r1=661104&r2=661478&rev=661478&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/tr1.util/2.smartptr.shared.cpp (original)
+++ stdcxx/branches/4.3.x/tests/utilities/20.smartptr.shared.cpp Thu May 29 13:58:21 2008
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 /***************************************************************************
  *
- * 2.smartptr.shared.cpp - test exercising class template shared_ptr
+ * 20.smartptr.shared.cpp - test exercising class template shared_ptr
  *
  * $Id$
  *
@@ -27,10 +27,13 @@
  * 
  **************************************************************************/
 
-#include <tr1/_smartptr.h>
-
 #include <driver.h>
 
+// compile out all test code if extensions disabled
+#ifndef _RWSTD_NO_EXT_CXX_0X
+
+#include <rw/_smartptr.h>
+
 /**************************************************************************/
 
 int next_id;
@@ -159,57 +162,57 @@
 static void
 test_ctor ()
 {
-    rw_info (0, "tr.util.smartptr.shared.cons", 0,
+    rw_info (0, "util.smartptr.shared.cons", 0,
              "shared_ptr constructors");
 
     {   // default ctor
-        std::tr1::shared_ptr<char> ptr;
+        std::shared_ptr<char> ptr;
         rw_assert (0 == ptr.get (), 0, __LINE__, "");
         rw_assert (0 == ptr.use_count (), 0, __LINE__, "");
     }
 
     {   // default ctor
-        std::tr1::shared_ptr<const short> ptr;
+        std::shared_ptr<const short> ptr;
         rw_assert (0 == ptr.get (), 0, __LINE__, "");
         rw_assert (0 == ptr.use_count (), 0, __LINE__, "");
     }
 
     {   // default ctor
-        std::tr1::shared_ptr<volatile int> ptr;
+        std::shared_ptr<volatile int> ptr;
         rw_assert (0 == ptr.get (), 0, __LINE__, "");
         rw_assert (0 == ptr.use_count (), 0, __LINE__, "");
     }
 
     {   // default ctor
-        std::tr1::shared_ptr<const volatile long> ptr;
+        std::shared_ptr<const volatile long> ptr;
         rw_assert (0 == ptr.get (), 0, __LINE__, "");
         rw_assert (0 == ptr.use_count (), 0, __LINE__, "");
     }
 
     {   // template <class U> shared_ptr(U*)
         const char* const p = new char ('A');
-        std::tr1::shared_ptr<const char> ptr (p);
+        std::shared_ptr<const char> ptr (p);
         rw_assert (p == ptr.get (), 0, __LINE__, "");
         rw_assert (1 == ptr.use_count (), 0, __LINE__, "");
     }
 
     {   // template <class U> shared_ptr(U*)
         const char* const p = new char ('A');
-        std::tr1::shared_ptr<const void> ptr (p);
+        std::shared_ptr<const void> ptr (p);
         rw_assert (p == ptr.get (), 0, __LINE__, "");
         rw_assert (1 == ptr.use_count (), 0, __LINE__, "");
     }
 
     {   // template <class U> shared_ptr(U*)
         short* const p = new short (__LINE__);
-        std::tr1::shared_ptr<volatile void> ptr (p);
+        std::shared_ptr<volatile void> ptr (p);
         rw_assert (p == ptr.get (), 0, __LINE__, "");
         rw_assert (1 == ptr.use_count (), 0, __LINE__, "");
     }
 
     {   // template <class U> shared_ptr(U*)
         double* const p = new double ();
-        std::tr1::shared_ptr<const volatile void> ptr (p);
+        std::shared_ptr<const volatile void> ptr (p);
         rw_assert (p == ptr.get (), 0, __LINE__, "");
         rw_assert (1 == ptr.use_count (), 0, __LINE__, "");
     }
@@ -218,7 +221,7 @@
 
     {   // template <class U> shared_ptr(U*)
         char* const p = new char ('A');
-        std::tr1::shared_ptr<int> ptr (p);
+        std::shared_ptr<int> ptr (p);
     }
 
 #endif   // ILL_FORMED
@@ -229,10 +232,10 @@
         Derived<int>* const pd2 = new Derived<int>;
         Derived<int>* const pd3 = new Derived<int>;
 
-        std::tr1::shared_ptr<const Derived<int> > ptr_d (pd0);
-        std::tr1::shared_ptr<const Base_0<int> >  ptr_0 (pd1);
-        std::tr1::shared_ptr<const Base_1<int> >  ptr_1 (pd2);
-        std::tr1::shared_ptr<const Base<int> >    ptr_b (pd3);
+        std::shared_ptr<const Derived<int> > ptr_d (pd0);
+        std::shared_ptr<const Base_0<int> >  ptr_0 (pd1);
+        std::shared_ptr<const Base_1<int> >  ptr_1 (pd2);
+        std::shared_ptr<const Base<int> >    ptr_b (pd3);
 
         rw_assert (pd0 == ptr_d.get (), 0, __LINE__,
                    "shared_ptr<Derived>(Derived* = %#p).get() == %#p, got %#p",
@@ -259,7 +262,7 @@
     {   // template <class U, class D> shared_ptr(U*, D)
         int* const p = new int (__LINE__);
         Deleter<int> d;
-        std::tr1::shared_ptr<int> ptr (p, d);
+        std::shared_ptr<int> ptr (p, d);
         rw_assert (p == ptr.get (), 0, __LINE__, "");
         rw_assert (1 == ptr.use_count (), 0, __LINE__, "");
     }
@@ -270,13 +273,13 @@
 static void
 test_copy_ctor ()
 {
-    rw_info (0, "tr.util.smartptr.shared.copy", 0,
+    rw_info (0, "util.smartptr.shared.copy", 0,
              "shared_ptr copy constructors");
 
     {
         // shared_ptr (const shared_ptr&)
-        std::tr1::shared_ptr<void> ptr;
-        std::tr1::shared_ptr<void> cpy (ptr);
+        std::shared_ptr<void> ptr;
+        std::shared_ptr<void> cpy (ptr);
         rw_assert (0 == ptr.get (), 0, __LINE__, "");
         rw_assert (0 == cpy.get (), 0, __LINE__, "");
         rw_assert (0 == ptr.use_count (), 0, __LINE__, "");
@@ -285,8 +288,8 @@
 
     {
         // shared_ptr (const shared_ptr&)
-        std::tr1::shared_ptr<double> ptr;
-        std::tr1::shared_ptr<double> cpy (ptr);
+        std::shared_ptr<double> ptr;
+        std::shared_ptr<double> cpy (ptr);
         rw_assert (ptr.get () == cpy.get (), 0, __LINE__, "");
         rw_assert (ptr.use_count () == cpy.use_count (), 0, __LINE__, "");
     }
@@ -294,8 +297,8 @@
     {
         // shared_ptr (const shared_ptr&)
         int* const p = new int (__LINE__);
-        std::tr1::shared_ptr<int> ptr (p);
-        std::tr1::shared_ptr<int> cpy (ptr);
+        std::shared_ptr<int> ptr (p);
+        std::shared_ptr<int> cpy (ptr);
         rw_assert (ptr.get () == cpy.get (), 0, __LINE__, "");
         rw_assert (ptr.use_count () == cpy.use_count (), 0, __LINE__, "");
     }
@@ -303,8 +306,8 @@
     {
         // shared_ptr (const shared_ptr&)
         int* const p = new int (__LINE__);
-        std::tr1::shared_ptr<int> ptr (p);
-        std::tr1::shared_ptr<void> cpy (ptr);
+        std::shared_ptr<int> ptr (p);
+        std::shared_ptr<void> cpy (ptr);
         rw_assert (ptr.get () == cpy.get (), 0, __LINE__, "");
         rw_assert (ptr.use_count () == cpy.use_count (), 0, __LINE__, "");
     }
@@ -314,8 +317,8 @@
     {
         // shared_ptr (const shared_ptr&)
         int* const p = new int (__LINE__);
-        std::tr1::shared_ptr<void> ptr (p);
-        std::tr1::shared_ptr<int> cpy (ptr);
+        std::shared_ptr<void> ptr (p);
+        std::shared_ptr<int> cpy (ptr);
         rw_assert (ptr.get () == cpy.get (), 0, __LINE__, "");
         rw_assert (ptr.use_count () == cpy.use_count (), 0, __LINE__, "");
     }
@@ -347,10 +350,10 @@
 
 #endif   // HP aCC
 
-        std::tr1::shared_ptr<v_Derived_i> ptr_d (pd);
-        std::tr1::shared_ptr<v_Base_0_i>  ptr_0 (ptr_d);
-        std::tr1::shared_ptr<v_Base_1_i>  ptr_1 (ptr_d);
-        std::tr1::shared_ptr<v_Base_i>    ptr_b (ptr_d);
+        std::shared_ptr<v_Derived_i> ptr_d (pd);
+        std::shared_ptr<v_Base_0_i>  ptr_0 (ptr_d);
+        std::shared_ptr<v_Base_1_i>  ptr_1 (ptr_d);
+        std::shared_ptr<v_Base_i>    ptr_b (ptr_d);
 
         rw_assert (pd == ptr_d.get (), 0, __LINE__,
                    "shared_ptr<Derived>(Derived* = %#p).get() == %#p, got %#p",
@@ -386,14 +389,14 @@
 static void
 test_dtor ()
 {
-    rw_info (0, "tr.util.smartptr.shared.dest", 0,
+    rw_info (0, "util.smartptr.shared.dest", 0,
              "shared_ptr destructor");
 
     {
         // ~shared_ptr()
         const int base_dtors = Base<int>::n_dtors;
         {
-            std::tr1::shared_ptr<Base<int> > ptr;
+            std::shared_ptr<Base<int> > ptr;
         }
         rw_assert (base_dtors == Base<int>::n_dtors, 0, __LINE__, "");
     }
@@ -402,7 +405,7 @@
         // ~shared_ptr()
         const int base_dtors = Base<int>::n_dtors;
         {
-            std::tr1::shared_ptr<Base<int> > ptr (new Base<int>);
+            std::shared_ptr<Base<int> > ptr (new Base<int>);
         }
         rw_assert (base_dtors + 1 == Base<int>::n_dtors, 0, __LINE__, "");
     }
@@ -412,7 +415,7 @@
         const int base_dtors    = Base<int>::n_dtors;
         const int derived_dtors = Derived<int>::n_dtors;
         {
-            std::tr1::shared_ptr<Derived<int> > ptr (new Derived<int>);
+            std::shared_ptr<Derived<int> > ptr (new Derived<int>);
         }
         rw_assert (base_dtors + 1 == Base<int>::n_dtors, 0, __LINE__, "");
         rw_assert (derived_dtors + 1 == Derived<int>::n_dtors, 0, __LINE__, "");
@@ -423,7 +426,7 @@
         const int base_dtors    = Base<int>::n_dtors;
         const int derived_dtors = Derived<int>::n_dtors;
         {
-            std::tr1::shared_ptr<Base<int> > ptr (new Derived<int>);
+            std::shared_ptr<Base<int> > ptr (new Derived<int>);
         }
         rw_assert (base_dtors + 1 == Base<int>::n_dtors, 0, __LINE__, "");
         rw_assert (derived_dtors + 1 == Derived<int>::n_dtors, 0, __LINE__, "");
@@ -434,7 +437,7 @@
         const int base_dtors    = Base<int>::n_dtors;
         const int derived_dtors = Derived<int>::n_dtors;
         {
-            std::tr1::shared_ptr<void> ptr (new Derived<int>);
+            std::shared_ptr<void> ptr (new Derived<int>);
         }
         rw_assert (base_dtors + 1 == Base<int>::n_dtors, 0, __LINE__, "");
         rw_assert (derived_dtors + 1 == Derived<int>::n_dtors, 0, __LINE__, "");
@@ -445,9 +448,9 @@
         Deleter<int> d;
         const int funcalls = Deleter<int>::n_funcalls;
         {
-            std::tr1::shared_ptr<int> ptr ((int*)0, d);
+            std::shared_ptr<int> ptr ((int*)0, d);
             {
-                std::tr1::shared_ptr<int> cpy (ptr);
+                std::shared_ptr<int> cpy (ptr);
                 _RWSTD_UNUSED (cpy);
             }
             rw_assert (funcalls == Deleter<int>::n_funcalls, 0, __LINE__, "");
@@ -460,7 +463,7 @@
         Deleter<int> d;
         const int funcalls = Deleter<int>::n_funcalls;
         {
-            std::tr1::shared_ptr<int> ptr ((int*)0, d);
+            std::shared_ptr<int> ptr ((int*)0, d);
             _RWSTD_UNUSED (ptr);
         }
         rw_assert (funcalls + 1 == Deleter<int>::n_funcalls, 0, __LINE__, "");
@@ -472,7 +475,7 @@
         Deleter<int> d;
         const int funcalls = Deleter<int>::n_funcalls;
         {
-            std::tr1::shared_ptr<int> ptr (p, d);
+            std::shared_ptr<int> ptr (p, d);
         }
         rw_assert (funcalls + 1 == Deleter<int>::n_funcalls, 0, __LINE__, "");
     }
@@ -487,7 +490,7 @@
         int b_dtors  = Base<int>::n_dtors;
 
         {
-            std::tr1::shared_ptr<Derived<int> >(new Derived<int>);
+            std::shared_ptr<Derived<int> >(new Derived<int>);
         }
 
         rw_assert (1 == Derived<int>::n_dtors - d_dtors, 0, __LINE__,
@@ -505,7 +508,7 @@
         b_dtors  = Base<int>::n_dtors;
 
         {
-            std::tr1::shared_ptr<Base_1<int> >(new Derived<int>);
+            std::shared_ptr<Base_1<int> >(new Derived<int>);
         }
 
         rw_assert (1 == Derived<int>::n_dtors - d_dtors, 0, __LINE__,
@@ -523,7 +526,7 @@
         b_dtors  = Base<int>::n_dtors;
 
         {
-            std::tr1::shared_ptr<Base_0<int> >(new Derived<int>);
+            std::shared_ptr<Base_0<int> >(new Derived<int>);
         }
 
         rw_assert (1 == Derived<int>::n_dtors - d_dtors, 0, __LINE__,
@@ -541,7 +544,7 @@
         b_dtors  = Base<int>::n_dtors;
 
         {
-            std::tr1::shared_ptr<Base<int> >(new Derived<int>);
+            std::shared_ptr<Base<int> >(new Derived<int>);
         }
 
         rw_assert (1 == Derived<int>::n_dtors - d_dtors, 0, __LINE__,
@@ -559,7 +562,7 @@
         b_dtors  = Base<int>::n_dtors;
 
         {
-            std::tr1::shared_ptr<void>(new Derived<int>);
+            std::shared_ptr<void>(new Derived<int>);
         }
 
         rw_assert (1 == Derived<int>::n_dtors - d_dtors, 0, __LINE__,
@@ -578,12 +581,12 @@
 static void
 test_assign ()
 {
-    rw_info (0, "tr.util.smartptr.shared.assign", 0,
+    rw_info (0, "util.smartptr.shared.assign", 0,
              "shared_ptr assignment operators");
 
     {   // operator=(const shared_ptr&)
-        std::tr1::shared_ptr<void> ptr0;
-        std::tr1::shared_ptr<void> ptr1;
+        std::shared_ptr<void> ptr0;
+        std::shared_ptr<void> ptr1;
 
         ptr1 = ptr0;
 
@@ -593,8 +596,8 @@
 
     {   // operator=(const shared_ptr&)
         int* const p = new int (__LINE__);
-        std::tr1::shared_ptr<int> ptr0 (p);
-        std::tr1::shared_ptr<int> ptr1;
+        std::shared_ptr<int> ptr0 (p);
+        std::shared_ptr<int> ptr1;
 
         ptr1 = ptr0;
 
@@ -604,8 +607,8 @@
 
     {   // template <class U> operator=(const shared_ptr<U>&)
         int* const p = new int (__LINE__);
-        std::tr1::shared_ptr<int>  ptr0 (p);
-        std::tr1::shared_ptr<void> ptr1;
+        std::shared_ptr<int>  ptr0 (p);
+        std::shared_ptr<void> ptr1;
 
         ptr1 = ptr0;
 
@@ -616,8 +619,8 @@
     {   // template <class U> operator=(const shared_ptr<U>&)
         Derived<int>* const p = new Derived<int>;
 
-        std::tr1::shared_ptr<Derived<int> > ptr0 (p);
-        std::tr1::shared_ptr<Base<int> >    ptr1;
+        std::shared_ptr<Derived<int> > ptr0 (p);
+        std::shared_ptr<Base<int> >    ptr1;
 
         ptr1 = ptr0;
 
@@ -630,12 +633,12 @@
     {   // template <class U> shared_ptr(U*)
         Derived<int>* const pd = new Derived<int>;
 
-        const std::tr1::shared_ptr<Derived<int> > ptr_d (pd);
+        const std::shared_ptr<Derived<int> > ptr_d (pd);
 
-        std::tr1::shared_ptr<Base_0<int> > ptr_0;
-        std::tr1::shared_ptr<Base_1<int> > ptr_1;
-        std::tr1::shared_ptr<Base<int> >   ptr_b;
-        std::tr1::shared_ptr<void>         ptr_v;
+        std::shared_ptr<Base_0<int> > ptr_0;
+        std::shared_ptr<Base_1<int> > ptr_1;
+        std::shared_ptr<Base<int> >   ptr_b;
+        std::shared_ptr<void>         ptr_v;
 
         ptr_0 = ptr_d;
         ptr_1 = ptr_d;
@@ -675,7 +678,7 @@
 static void
 test_modifiers ()
 {
-    rw_info (0, "tr.util.smartptr.shared.mod", 0,
+    rw_info (0, "util.smartptr.shared.mod", 0,
              "shared_ptr modifiers");
 
     rw_warn (0, 0, 0,
@@ -687,11 +690,11 @@
 static void
 test_observers ()
 {
-    rw_info (0, "tr.util.smartptr.shared.obs", 0,
+    rw_info (0, "util.smartptr.shared.obs", 0,
              "shared_ptr observers");
 
     {   // operator*()
-        std::tr1::shared_ptr<void> ptr;
+        std::shared_ptr<void> ptr;
         rw_assert (0 == ptr.get (), 0, __LINE__, "");
         rw_assert (0 == ptr.use_count (), 0, __LINE__, "");
     }
@@ -705,19 +708,19 @@
 static void
 test_comparison ()
 {
-    rw_info (0, "tr.util.smartptr.shared.cmp", 0,
+    rw_info (0, "util.smartptr.shared.cmp", 0,
              "shared_ptr comparison");
 
     {   // operator==
-        std::tr1::shared_ptr<void> ptr;
+        std::shared_ptr<void> ptr;
         rw_assert (ptr == ptr, 0, __LINE__, "");
 
         rw_assert (!(ptr != ptr), 0, __LINE__, "");
     }
 
     {   // operator==
-        std::tr1::shared_ptr<void> ptr0;
-        std::tr1::shared_ptr<int>  ptr1;
+        std::shared_ptr<void> ptr0;
+        std::shared_ptr<int>  ptr1;
         rw_assert (ptr0 == ptr1, 0, __LINE__, "");
         rw_assert (ptr1 == ptr0, 0, __LINE__, "");
 
@@ -728,8 +731,8 @@
 #if ILL_FORMED == -1 || ILL_FORMED == __LINE__
 
     {
-        std::tr1::shared_ptr<char> ptr0;
-        std::tr1::shared_ptr<int>  ptr1;
+        std::shared_ptr<char> ptr0;
+        std::shared_ptr<int>  ptr1;
 
         rw_assert (ptr0 == ptr1, 0, __LINE__, "");
         rw_assert (ptr1 == ptr0, 0, __LINE__, "");
@@ -742,8 +745,8 @@
 
     {   // operator==
         int* const p = new int (__LINE__);
-        std::tr1::shared_ptr<int> ptr0 (p);
-        std::tr1::shared_ptr<int> ptr1 (ptr0);
+        std::shared_ptr<int> ptr0 (p);
+        std::shared_ptr<int> ptr1 (ptr0);
 
         rw_assert (ptr0 == ptr1, 0, __LINE__, "");
         rw_assert (ptr1 == ptr0, 0, __LINE__, "");
@@ -755,8 +758,8 @@
     {   // operator==
         int* const p0 = new int (__LINE__);
         int* const p1 = new int (__LINE__);
-        std::tr1::shared_ptr<int> ptr0 (p0);
-        std::tr1::shared_ptr<int> ptr1 (p1);
+        std::shared_ptr<int> ptr0 (p0);
+        std::shared_ptr<int> ptr1 (p1);
 
         rw_assert (!(ptr0 == ptr1), 0, __LINE__, "");
         rw_assert (!(ptr1 == ptr0), 0, __LINE__, "");
@@ -768,11 +771,11 @@
     {   // operator<
         Derived<int>* const p = new Derived<int>;
 
-        std::tr1::shared_ptr<Derived<int> > ptr2 (p);
-        std::tr1::shared_ptr<Base_1<int> >  ptr1 (ptr2);
-        std::tr1::shared_ptr<Base_0<int> >  ptr0 (ptr2);
-        std::tr1::shared_ptr<Base<int> >    ptr_b1 (ptr1);
-        std::tr1::shared_ptr<Base<int> >    ptr_b0 (ptr0);
+        std::shared_ptr<Derived<int> > ptr2 (p);
+        std::shared_ptr<Base_1<int> >  ptr1 (ptr2);
+        std::shared_ptr<Base_0<int> >  ptr0 (ptr2);
+        std::shared_ptr<Base<int> >    ptr_b1 (ptr1);
+        std::shared_ptr<Base<int> >    ptr_b0 (ptr0);
 
         const bool eq_1_2 = (ptr1.get () == ptr2.get ()) == (ptr1 == ptr2);
         const bool eq_0_2 = (ptr0.get () == ptr2.get ()) == (ptr0 == ptr2);
@@ -783,22 +786,22 @@
     }
 
     {   // operator<
-        std::tr1::shared_ptr<void> ptr;
+        std::shared_ptr<void> ptr;
 
         rw_assert (!(ptr < ptr), 0, __LINE__, "");
     }
 
     {   // operator<
-        std::tr1::shared_ptr<void> ptr;
-        std::tr1::shared_ptr<void> cpy (ptr);
+        std::shared_ptr<void> ptr;
+        std::shared_ptr<void> cpy (ptr);
 
         rw_assert (!(ptr < cpy) && !(cpy < ptr), 0, __LINE__, "");
     }
 
     {   // operator<
         int* const p = new int (__LINE__);
-        std::tr1::shared_ptr<void> ptr (p);
-        std::tr1::shared_ptr<void> cpy (ptr);
+        std::shared_ptr<void> ptr (p);
+        std::shared_ptr<void> cpy (ptr);
 
         rw_assert (!(ptr < cpy) && !(cpy < ptr), 0, __LINE__, "");
     }
@@ -806,10 +809,10 @@
     {   // operator<
         Derived<int>* const p = new Derived<int>;
 
-        std::tr1::shared_ptr<Derived<int> > ptr2 (p);
-        std::tr1::shared_ptr<Base_1<int> >  ptr1 (ptr2);
-        std::tr1::shared_ptr<Base_0<int> >  ptr0 (ptr2);
-        std::tr1::shared_ptr<void>          ptr  (ptr0);
+        std::shared_ptr<Derived<int> > ptr2 (p);
+        std::shared_ptr<Base_1<int> >  ptr1 (ptr2);
+        std::shared_ptr<Base_0<int> >  ptr0 (ptr2);
+        std::shared_ptr<void>          ptr  (ptr0);
 
         rw_assert (!(ptr  < ptr0) && !(ptr0 < ptr),  0, __LINE__, "");
         rw_assert (!(ptr  < ptr1) && !(ptr1 < ptr),  0, __LINE__, "");
@@ -823,8 +826,8 @@
         short* const p0 = new short (__LINE__);
         float* const p1 = new float (__LINE__);
 
-        std::tr1::shared_ptr<short> ptr0 (p0);
-        std::tr1::shared_ptr<float> ptr1 (p1);
+        std::shared_ptr<short> ptr0 (p0);
+        std::shared_ptr<float> ptr1 (p1);
 
         rw_assert (ptr0 < ptr1 || ptr1 < ptr0, 0, __LINE__, "");
     }
@@ -835,7 +838,7 @@
 static void
 test_io ()
 {
-    rw_info (0, "tr.util.smartptr.shared.io", 0,
+    rw_info (0, "util.smartptr.shared.io", 0,
              "shared_ptr I/O");
 
     rw_warn (0, 0, 0,
@@ -847,7 +850,7 @@
 static void
 test_specialized ()
 {
-    rw_info (0, "tr.util.smartptr.shared.spec", 0,
+    rw_info (0, "util.smartptr.shared.spec", 0,
              "shared_ptr specialized algorithms");
 
     rw_warn (0, 0, 0,
@@ -859,7 +862,7 @@
 static void
 test_casts ()
 {
-    rw_info (0, "tr.util.smartptr.shared.cast", 0,
+    rw_info (0, "util.smartptr.shared.cast", 0,
              "shared_ptr casts");
 
     {
@@ -876,7 +879,7 @@
 static void
 test_deleter ()
 {
-    rw_info (0, "tr.util.smartptr.shared.getdeleter", 0,
+    rw_info (0, "util.smartptr.shared.getdeleter", 0,
              "shared_ptr get_deleter");
 
     rw_warn (0, 0, 0,
@@ -929,7 +932,7 @@
 int main (int argc, char *argv[])
 {
     return rw_test (argc, argv, __FILE__,
-                    "tr.util.smartptr.shared",
+                    "util.smartptr.shared",
                     0 /* no comment */, run_test,
                     "|-no-ctor# "
                     "|-no-copy_ctor# "
@@ -954,3 +957,24 @@
                     &no_casts, 
                     &no_deleter);
 }
+
+#else   // _RWSTD_NO_EXT_CXX_0X
+
+static int
+run_test (int, char*[])
+{
+    rw_warn (0, 0, __LINE__,
+	         "test disabled because _RWSTD_NO_EXT_CXX_0X is defined");
+    return 0;
+}
+
+int main (int argc, char *argv[])
+{
+    return rw_test (argc, argv, __FILE__,
+                    "util.smartptr.shared",
+                    0 /* no comment */,
+                    run_test,
+                    0);
+}
+
+#endif   // _RWSTD_NO_EXT_CXX_0X

Copied: stdcxx/branches/4.3.x/tests/utilities/20.smartptr.weak.cpp (from r661104, stdcxx/branches/4.3.x/tests/tr1.util/2.smartptr.weak.cpp)
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/utilities/20.smartptr.weak.cpp?p2=stdcxx/branches/4.3.x/tests/utilities/20.smartptr.weak.cpp&p1=stdcxx/branches/4.3.x/tests/tr1.util/2.smartptr.weak.cpp&r1=661104&r2=661478&rev=661478&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/tr1.util/2.smartptr.weak.cpp (original)
+++ stdcxx/branches/4.3.x/tests/utilities/20.smartptr.weak.cpp Thu May 29 13:58:21 2008
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 /***************************************************************************
  *
- * 2.smartptr.weak.cpp - test exercising class template weak_ptr
+ * 20.smartptr.weak.cpp - test exercising class template weak_ptr
  *
  * $Id$
  *
@@ -23,15 +23,17 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2008 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
-#include <cassert>
-#include <tr1/_smartptr.h>
-
 #include <driver.h>
 
+// compile out all test code if extensions disabled
+#ifndef _RWSTD_NO_EXT_CXX_0X
+
+#include <rw/_smartptr.h>
+
 /**************************************************************************/
 
 template <class T>
@@ -122,46 +124,46 @@
 static void
 test_ctor ()
 {
-    rw_info (0, "tr.util.smartptr.weak.cons", 0,
+    rw_info (0, "util.smartptr.weak.cons", 0,
              "weak_ptr constructors");
 
     {   // default ctor
-        std::tr1::weak_ptr<char> weak;
+        std::weak_ptr<char> weak;
         rw_assert (0 == weak.use_count (), 0, __LINE__, "");
     }
 
     {   // shared_ptr converting ctor
-        std::tr1::shared_ptr<char> shared;
-        std::tr1::weak_ptr<char>   weak (shared);
+        std::shared_ptr<char> shared;
+        std::weak_ptr<char>   weak (shared);
         rw_assert (0 == weak.use_count (), 0, __LINE__, "");
     }
 
     {   // shared_ptr converting ctor
-        std::tr1::shared_ptr<char> shared;
-        std::tr1::weak_ptr<void>   weak (shared);
+        std::shared_ptr<char> shared;
+        std::weak_ptr<void>   weak (shared);
         rw_assert (0 == weak.use_count (), 0, __LINE__, "");
     }
 
     {   // shared_ptr converting ctor
         int* const p = new int (__LINE__);
-        std::tr1::shared_ptr<int> shared (p);
-        std::tr1::weak_ptr<int>   weak (shared);
+        std::shared_ptr<int> shared (p);
+        std::weak_ptr<int>   weak (shared);
         rw_assert (shared.use_count () == weak.use_count (), 0, __LINE__, "");
     }
 
     {   // shared_ptr converting ctor
         int* const p = new int (__LINE__);
-        std::tr1::shared_ptr<int> shared0 (p);
-        std::tr1::shared_ptr<int> shared1 (shared0);
-        std::tr1::weak_ptr<int>   weak (shared1);
+        std::shared_ptr<int> shared0 (p);
+        std::shared_ptr<int> shared1 (shared0);
+        std::weak_ptr<int>   weak (shared1);
         rw_assert (shared1.use_count () == weak.use_count (), 0, __LINE__, "");
     }
 
 
     {   // shared_ptr converting ctor
         int* const p = new int (__LINE__);
-        std::tr1::shared_ptr<int> shared (p);
-        std::tr1::weak_ptr<void>  weak (shared);
+        std::shared_ptr<int> shared (p);
+        std::weak_ptr<void>  weak (shared);
         shared.reset ();
 
         rw_assert (0 == weak.use_count (), 0, __LINE__, "");
@@ -169,8 +171,8 @@
 
     {   // shared_ptr converting ctor
         Derived<int>* const p = new Derived<int>;
-        std::tr1::shared_ptr<Derived<int> > shared (p);
-        std::tr1::weak_ptr<Base<int> >      weak (shared);
+        std::shared_ptr<Derived<int> > shared (p);
+        std::weak_ptr<Base<int> >      weak (shared);
         shared.reset ();
 
         rw_assert (0 == weak.use_count (), 0, __LINE__, "");
@@ -182,13 +184,13 @@
 static void
 test_copy_ctor ()
 {
-    rw_info (0, "tr.util.smartptr.weak.copy", 0,
+    rw_info (0, "util.smartptr.weak.copy", 0,
              "weak_ptr copy constructors");
 
     {
         // weak_ptr (const weak_ptr&)
-        std::tr1::weak_ptr<void> weak;
-        std::tr1::weak_ptr<void> copy (weak);
+        std::weak_ptr<void> weak;
+        std::weak_ptr<void> copy (weak);
         rw_assert (0 == weak.use_count (), 0, __LINE__, "");
         rw_assert (0 == copy.use_count (), 0, __LINE__, "");
     }
@@ -196,9 +198,9 @@
     {
         // weak_ptr (const weak_ptr&)
         int* const p = new int (__LINE__);
-        std::tr1::shared_ptr<int> shared (p);
-        std::tr1::weak_ptr<int>   weak (shared);
-        std::tr1::weak_ptr<int>   copy (weak);
+        std::shared_ptr<int> shared (p);
+        std::weak_ptr<int>   weak (shared);
+        std::weak_ptr<int>   copy (weak);
 
         rw_assert (weak.use_count () == shared.use_count (), 0, __LINE__, "");
         rw_assert (copy.use_count () == shared.use_count (), 0, __LINE__, "");
@@ -207,10 +209,10 @@
     {
         // weak_ptr (const weak_ptr&)
         int* const p = new int (__LINE__);
-        std::tr1::shared_ptr<int> shared0 (p);
-        std::tr1::shared_ptr<int> shared1 (shared0);
-        std::tr1::weak_ptr<int>   weak (shared1);
-        std::tr1::weak_ptr<int>   copy (weak);
+        std::shared_ptr<int> shared0 (p);
+        std::shared_ptr<int> shared1 (shared0);
+        std::weak_ptr<int>   weak (shared1);
+        std::weak_ptr<int>   copy (weak);
 
         rw_assert (weak.use_count () == shared1.use_count (), 0, __LINE__, "");
         rw_assert (copy.use_count () == shared1.use_count (), 0, __LINE__, "");
@@ -219,10 +221,10 @@
     {
         // weak_ptr (const weak_ptr&)
         int* const p = new int (__LINE__);
-        std::tr1::shared_ptr<int> shared0 (p);
-        std::tr1::shared_ptr<int> shared1 (shared0);
-        std::tr1::weak_ptr<int>   weak (shared1);
-        std::tr1::weak_ptr<void>  copy (weak);
+        std::shared_ptr<int> shared0 (p);
+        std::shared_ptr<int> shared1 (shared0);
+        std::weak_ptr<int>   weak (shared1);
+        std::weak_ptr<void>  copy (weak);
 
         rw_assert (weak.use_count () == shared1.use_count (), 0, __LINE__, "");
         rw_assert (copy.use_count () == shared1.use_count (), 0, __LINE__, "");
@@ -231,10 +233,10 @@
     {
         // weak_ptr (const weak_ptr&)
         Derived<int>* const p = new Derived<int>;
-        std::tr1::shared_ptr<Derived<int> > shared0 (p);
-        std::tr1::shared_ptr<Derived<int> > shared1 (shared0);
-        std::tr1::weak_ptr<Derived<int> >   weak (shared1);
-        std::tr1::weak_ptr<Base<int> >      copy (weak);
+        std::shared_ptr<Derived<int> > shared0 (p);
+        std::shared_ptr<Derived<int> > shared1 (shared0);
+        std::weak_ptr<Derived<int> >   weak (shared1);
+        std::weak_ptr<Base<int> >      copy (weak);
 
         rw_assert (weak.use_count () == shared1.use_count (), 0, __LINE__, "");
         rw_assert (copy.use_count () == shared1.use_count (), 0, __LINE__, "");
@@ -254,14 +256,14 @@
 static void
 test_dtor ()
 {
-    rw_info (0, "tr.util.smartptr.weak.dest", 0,
+    rw_info (0, "util.smartptr.weak.dest", 0,
              "weak_ptr destructor");
 
     {
         // ~weak_ptr()
         const int base_dtors = Base<int>::n_dtors;
         {
-            std::tr1::weak_ptr<Base<int> > weak;
+            std::weak_ptr<Base<int> > weak;
         }
         rw_assert (base_dtors == Base<int>::n_dtors, 0, __LINE__, "");
     }
@@ -270,9 +272,9 @@
         // ~weak_ptr()
         const int base_dtors = Base<int>::n_dtors;
         Base<int>* const p = new Base<int>;
-        std::tr1::shared_ptr<Base<int> > shared (p);
+        std::shared_ptr<Base<int> > shared (p);
         {
-            std::tr1::weak_ptr<Base<int> > weak (shared);
+            std::weak_ptr<Base<int> > weak (shared);
         }
         rw_assert (base_dtors == Base<int>::n_dtors, 0, __LINE__, "");
     }
@@ -283,10 +285,10 @@
         const int derived_dtors = Derived<int>::n_dtors;
 
         Derived<int>* const p = new Derived<int>;
-        std::tr1::shared_ptr<Derived<int> > shared (p);
+        std::shared_ptr<Derived<int> > shared (p);
 
         {
-            std::tr1::weak_ptr<Base<int> > weak (shared);
+            std::weak_ptr<Base<int> > weak (shared);
         }
         rw_assert (base_dtors    == Base<int>::n_dtors, 0, __LINE__, "");
         rw_assert (derived_dtors == Derived<int>::n_dtors, 0, __LINE__, "");
@@ -298,11 +300,11 @@
         const int derived_dtors = Derived<int>::n_dtors;
 
         Derived<int>* const p = new Derived<int>;
-        std::tr1::shared_ptr<Derived<int> > shared (p);
+        std::shared_ptr<Derived<int> > shared (p);
 
         {
-            std::tr1::weak_ptr<Base<int> > weak (shared);
-            std::tr1::weak_ptr<Base<int> > copy (shared);
+            std::weak_ptr<Base<int> > weak (shared);
+            std::weak_ptr<Base<int> > copy (shared);
         }
         rw_assert (base_dtors    == Base<int>::n_dtors, 0, __LINE__, "");
         rw_assert (derived_dtors == Derived<int>::n_dtors, 0, __LINE__, "");
@@ -314,10 +316,10 @@
         const int derived_dtors = Derived<int>::n_dtors;
 
         Derived<int>* const p = new Derived<int>;
-        std::tr1::shared_ptr<Derived<int> > shared (p);
+        std::shared_ptr<Derived<int> > shared (p);
 
         {
-            std::tr1::weak_ptr<Base<int> > weak (shared);
+            std::weak_ptr<Base<int> > weak (shared);
             shared.reset ();
         }
         rw_assert (base_dtors + 1    == Base<int>::n_dtors, 0, __LINE__, "");
@@ -329,11 +331,11 @@
         const int base_dtors    = Base<int>::n_dtors;
         const int derived_dtors = Derived<int>::n_dtors;
 
-        std::tr1::weak_ptr<Derived<int> > weak;
+        std::weak_ptr<Derived<int> > weak;
 
         {
             Derived<int>* const p = new Derived<int>;
-            std::tr1::shared_ptr<Derived<int> > shared (p);
+            std::shared_ptr<Derived<int> > shared (p);
 
             weak = shared;
         }
@@ -347,14 +349,14 @@
 static void
 test_assign ()
 {
-    rw_info (0, "tr.util.smartptr.weak.assign", 0,
+    rw_info (0, "util.smartptr.weak.assign", 0,
              "weak_ptr assignment operators");
 
 #if 0
 
     {   // operator=(const weak_ptr&)
-        std::tr1::weak_ptr<void> ptr0;
-        std::tr1::weak_ptr<void> ptr1;
+        std::weak_ptr<void> ptr0;
+        std::weak_ptr<void> ptr1;
 
         ptr1 = ptr0;
 
@@ -364,8 +366,8 @@
 
     {   // operator=(const weak_ptr&)
         int* const p = new int (__LINE__);
-        std::tr1::weak_ptr<int> ptr0 (p);
-        std::tr1::weak_ptr<int> ptr1;
+        std::weak_ptr<int> ptr0 (p);
+        std::weak_ptr<int> ptr1;
 
         ptr1 = ptr0;
 
@@ -375,8 +377,8 @@
 
     {   // template <class U> operator=(const weak_ptr<U>&)
         int* const p = new int (__LINE__);
-        std::tr1::weak_ptr<int> ptr0 (p);
-        std::tr1::weak_ptr<void> ptr1;
+        std::weak_ptr<int> ptr0 (p);
+        std::weak_ptr<void> ptr1;
 
         ptr1 = ptr0;
 
@@ -386,8 +388,8 @@
 
     {   // template <class U> operator=(const weak_ptr<U>&)
         Derived<int>* const p = new Derived<int>;
-        std::tr1::weak_ptr<Derived<int> > ptr0 (p);
-        std::tr1::weak_ptr<Base<int> > ptr1;
+        std::weak_ptr<Derived<int> > ptr0 (p);
+        std::weak_ptr<Base<int> > ptr1;
 
         ptr1 = ptr0;
 
@@ -397,8 +399,8 @@
 
     {   // template <class U> operator=(const weak_ptr<U>&)
         Derived<int>* const p = new Derived<int>;
-        std::tr1::weak_ptr<Base<int> > ptr0 (p);
-        std::tr1::weak_ptr<void>       ptr1;
+        std::weak_ptr<Base<int> > ptr0 (p);
+        std::weak_ptr<void>       ptr1;
 
         ptr1 = ptr0;
 
@@ -415,7 +417,7 @@
 static void
 test_modifiers ()
 {
-    rw_info (0, "tr.util.smartptr.weak.mod", 0,
+    rw_info (0, "util.smartptr.weak.mod", 0,
              "weak_ptr modifiers");
 
     rw_warn (0, 0, 0,
@@ -427,43 +429,43 @@
 static void
 test_observers ()
 {
-    rw_info (0, "tr.util.smartptr.weak.obs", 0,
+    rw_info (0, "util.smartptr.weak.obs", 0,
              "weak_ptr observers");
 
     {   // use_count()
-        std::tr1::weak_ptr<void> weak;
+        std::weak_ptr<void> weak;
         rw_assert (0 == weak.use_count (), 0, __LINE__, "");
     }
 
     {   // expired()
-        std::tr1::weak_ptr<void> weak;
+        std::weak_ptr<void> weak;
         rw_assert (weak.expired (), 0, __LINE__, "");
     }
 
     {   // expired()
-        std::tr1::shared_ptr<void> shared;
-        std::tr1::weak_ptr<void>   weak (shared);
+        std::shared_ptr<void> shared;
+        std::weak_ptr<void>   weak (shared);
         rw_assert (weak.expired (), 0, __LINE__, "");
     }
 
     {   // expired()
         int* const p = new int (__LINE__);
-        std::tr1::shared_ptr<void> shared (p);
-        std::tr1::weak_ptr<void>   weak (shared);
+        std::shared_ptr<void> shared (p);
+        std::weak_ptr<void>   weak (shared);
         rw_assert (!weak.expired (), 0, __LINE__, "");
     }
 
     {   // expired()
         int* const p = new int (__LINE__);
-        std::tr1::shared_ptr<void> shared (p);
-        std::tr1::weak_ptr<void>   weak (shared);
+        std::shared_ptr<void> shared (p);
+        std::weak_ptr<void>   weak (shared);
         shared.reset ();
         rw_assert (weak.expired (), 0, __LINE__, "");
     }
 
     {   // lock()
-        std::tr1::weak_ptr<void>   weak;
-        std::tr1::shared_ptr<void> shared (weak.lock ());
+        std::weak_ptr<void>   weak;
+        std::shared_ptr<void> shared (weak.lock ());
         
         rw_assert (0 == weak.use_count (), 0, __LINE__,
                    "weak_ptr<void>::use_count() == 1, got %ld",
@@ -475,9 +477,9 @@
 
     {   // lock()
         int* const p = new int (__LINE__);
-        std::tr1::shared_ptr<void> shared0 (p);
-        std::tr1::weak_ptr<void>   weak (shared0);
-        std::tr1::shared_ptr<void> shared1 (weak.lock ());
+        std::shared_ptr<void> shared0 (p);
+        std::weak_ptr<void>   weak (shared0);
+        std::shared_ptr<void> shared1 (weak.lock ());
         
         rw_assert (2 == weak.use_count (), 0, __LINE__,
                    "weak_ptr<void>::use_count() == 2, got %ld",
@@ -489,10 +491,10 @@
 
     {   // lock()
         int* const p = new int (__LINE__);
-        std::tr1::shared_ptr<void> shared0 (p);
-        std::tr1::weak_ptr<void>   weak (shared0);
-        std::tr1::shared_ptr<void> shared1 (weak.lock ());
-        std::tr1::shared_ptr<void> shared2 (shared1);
+        std::shared_ptr<void> shared0 (p);
+        std::weak_ptr<void>   weak (shared0);
+        std::shared_ptr<void> shared1 (weak.lock ());
+        std::shared_ptr<void> shared2 (shared1);
         
         rw_assert (3 == weak.use_count (), 0, __LINE__,
                    "weak_ptr<void>::use_count() == 3, got %ld",
@@ -526,7 +528,7 @@
 static void
 test_comparison ()
 {
-    rw_info (0, "tr.util.smartptr.weak.cmp", 0,
+    rw_info (0, "util.smartptr.weak.cmp", 0,
              "weak_ptr comparison");
 
     rw_warn (0, 0, 0,
@@ -538,7 +540,7 @@
 static void
 test_specialized ()
 {
-    rw_info (0, "tr.util.smartptr.weak.spec", 0,
+    rw_info (0, "util.smartptr.weak.spec", 0,
              "weak_ptr specialized algorithms");
 
     rw_warn (0, 0, 0,
@@ -585,7 +587,7 @@
 int main (int argc, char *argv[])
 {
     return rw_test (argc, argv, __FILE__,
-                    "tr.util.smartptr.weak",
+                    "util.smartptr.weak",
                     0 /* no comment */, run_test,
                     "|-no-ctor# "
                     "|-no-copy_ctor# "
@@ -604,3 +606,24 @@
                     &no_comparison, 
                     &no_specialized);
 }
+
+#else   // _RWSTD_NO_EXT_CXX_0X
+
+static int
+run_test (int, char* [])
+{
+    rw_warn (0, 0, __LINE__,
+             "test disabled because _RWSTD_NO_EXT_CXX_0X is defined");
+    return 0;
+}
+
+int main (int argc, char *argv[])
+{
+    return rw_test (argc, argv, __FILE__,
+                    "util.smartptr.weak",
+                    0 /* no comment */,
+                    run_test,
+                    0); 
+}
+
+#endif  // _RWSTD_NO_EXT_CXX_0X



Mime
View raw message