You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by el...@apache.org on 2008/07/02 22:48:31 UTC

svn commit: r673490 - in /stdcxx/branches/4.3.x/include: functional rw/_forward.h rw/_meta_other.h rw/_ref_wrap.h rw/_tuple.h tuple utility

Author: elemings
Date: Wed Jul  2 13:48:30 2008
New Revision: 673490

URL: http://svn.apache.org/viewvc?rev=673490&view=rev
Log:
2008-07-02  Eric Lemings <er...@roguewave.com>

	STDCXX-958
	* include/tuple: Include internal type traits headers
	individually.
	* include/utility: Conditionally include C++0x header if
	corresponding macro is defined (and C++0x extension is enabled).
	* include/functional: Likewise.
	* include/rw/_meta_other.h: Include other necessary headers.
	* include/rw/_forward.h: Remove guards for C++0x extension.
	Reindent preprocessing directives appropriately.
	* include/rw/_ref_wrap.h: Likewise.  
	* include/rw/_tuple.h: Likewise.  Also forward declare reference
	wrapper class rather than including header.  Use _STD macro to
	qualify move() function.

	Incorporates some initial code review comments:
	http://www.nabble.com/Re%3A-Tuple-status-p18230401.html


Modified:
    stdcxx/branches/4.3.x/include/functional
    stdcxx/branches/4.3.x/include/rw/_forward.h
    stdcxx/branches/4.3.x/include/rw/_meta_other.h
    stdcxx/branches/4.3.x/include/rw/_ref_wrap.h
    stdcxx/branches/4.3.x/include/rw/_tuple.h
    stdcxx/branches/4.3.x/include/tuple
    stdcxx/branches/4.3.x/include/utility

Modified: stdcxx/branches/4.3.x/include/functional
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/functional?rev=673490&r1=673489&r2=673490&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/include/functional (original)
+++ stdcxx/branches/4.3.x/include/functional Wed Jul  2 13:48:30 2008
@@ -46,6 +46,11 @@
 
 #include <rw/_funcbase.h>
 #include <rw/_ref_wrap.h>
+
+#ifndef _RWSTD_EXT_CXX_0X
+#  include <rw/_forward.h>
+#endif
+
 #include <rw/_defs.h>
 
 

Modified: stdcxx/branches/4.3.x/include/rw/_forward.h
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_forward.h?rev=673490&r1=673489&r2=673490&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/include/rw/_forward.h (original)
+++ stdcxx/branches/4.3.x/include/rw/_forward.h Wed Jul  2 13:48:30 2008
@@ -34,10 +34,7 @@
 #  define _RWSTD_RW_FORWARD_INCLUDED
 
 #  include <rw/_defs.h>
-
-#  if !defined _RWSTD_NO_EXT_CXX_0X
-
-#    include <rw/_meta_ref.h>   // for __rw_remove_reference
+#  include <rw/_meta_ref.h>     // for __rw_remove_reference
 
 
 _RWSTD_NAMESPACE (std) {
@@ -55,10 +52,10 @@
     }
 };
 
-#    define _RWSTD_IDENTITY(_Type)          _STD::identity<_Type>::type
+#  define _RWSTD_IDENTITY(_Type)          _STD::identity<_Type>::type
 
 
-#    if !defined _RWSTD_NO_RVALUE_REFERENCES
+#  if !defined _RWSTD_NO_RVALUE_REFERENCES
 
 template <class _Type>
 inline _Type&&
@@ -75,20 +72,18 @@
     return __x;
 }
 
-#      define _RWSTD_FORWARD(_Type, __x)    _STD::forward<_Type> (__x)
-#      define _RWSTD_MOVE(__x)              _STD::move (__x)
+#    define _RWSTD_FORWARD(_Type, __x)    _STD::forward<_Type> (__x)
+#    define _RWSTD_MOVE(__x)              _STD::move (__x)
 
-#    else   // no rvalue references
+#  else   // no rvalue references
 
-#      define _RWSTD_FORWARD(_Type, __x)    (__x)
-#      define _RWSTD_MOVE(__x)              (__x)
+#    define _RWSTD_FORWARD(_Type, __x)    (__x)
+#    define _RWSTD_MOVE(__x)              (__x)
 
-#    endif   // !defined _RWSTD_NO_RVALUE_REFERENCES
+#  endif   // !defined _RWSTD_NO_RVALUE_REFERENCES
 
 
 }   // namespace std
 
 
-#  endif   // !defined _RWSTD_NO_EXT_CXX_0X
-
 #endif   // _RWSTD_RW_FORWARD_INCLUDED

Modified: stdcxx/branches/4.3.x/include/rw/_meta_other.h
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_meta_other.h?rev=673490&r1=673489&r2=673490&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/include/rw/_meta_other.h (original)
+++ stdcxx/branches/4.3.x/include/rw/_meta_other.h Wed Jul  2 13:48:30 2008
@@ -31,10 +31,14 @@
 #define _RWSTD_RW_META_OTHER_H_INCLUDED
 
 #include <rw/_defs.h>
+
 #include <rw/_meta_cat.h>
 #include <rw/_meta_ref.h>
+#include <rw/_meta_prop.h>
 #include <rw/_meta_ptr.h>
 
+#include <rw/_static_assert.h>
+
 _RWSTD_NAMESPACE (__rw) {
 
 template <bool _Select, class _TypeT, class _TypeU>

Modified: stdcxx/branches/4.3.x/include/rw/_ref_wrap.h
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_ref_wrap.h?rev=673490&r1=673489&r2=673490&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/include/rw/_ref_wrap.h (original)
+++ stdcxx/branches/4.3.x/include/rw/_ref_wrap.h Wed Jul  2 13:48:30 2008
@@ -35,8 +35,6 @@
 
 #  include <rw/_defs.h>
 
-#  if !defined _RWSTD_NO_EXT_CXX_0X
-
 
 _RWSTD_NAMESPACE (std) {
 
@@ -109,6 +107,4 @@
 }   // namespace std
 
 
-#  endif   // !defined _RWSTD_NO_EXT_CXX_0X
-
 #endif   // _RWSTD_RW_REF_WRAP_INCLUDED

Modified: stdcxx/branches/4.3.x/include/rw/_tuple.h
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_tuple.h?rev=673490&r1=673489&r2=673490&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/include/rw/_tuple.h (original)
+++ stdcxx/branches/4.3.x/include/rw/_tuple.h Wed Jul  2 13:48:30 2008
@@ -35,11 +35,17 @@
 
 #  include <rw/_defs.h>
 
-#  if !defined _RWSTD_NO_EXT_CXX_0X
+#  include <rw/_allocator.h>        // for std::allocator_arg_t
+#  include <rw/_forward.h>          // for _RWSTD_FORWARD, _RWSTD_MOVE
+#  include <rw/_meta_other.h>       // for _RWSTD_DECAY
 
-#    include <rw/_allocator.h>      // for std::allocator_arg_t
-#    include <rw/_forward.h>        // for _RWSTD_FORWARD, _RWSTD_MOVE
-#    include <rw/_ref_wrap.h>       // for std::reference_wrapper
+
+_RWSTD_NAMESPACE (std) {
+
+template <class _TypeT>
+class reference_wrapper;
+
+}   // namespace std
 
 
 _RWSTD_NAMESPACE (__rw) {
@@ -47,7 +53,7 @@
 
 // internal tuple class template
 
-#    if !defined _RWSTD_NO_VARIADIC_TEMPLATES
+#  if !defined _RWSTD_NO_VARIADIC_TEMPLATES
 
 template <class... _Types>
 class __rw_tuple;
@@ -97,10 +103,10 @@
         return *this;
     }
 
-#      if !defined _RWSTD_NO_RVALUE_REFERENCES
+#    if !defined _RWSTD_NO_RVALUE_REFERENCES
 
     __rw_tuple (__rw_tuple&& __tuple)
-        : _Base (std::move<_Base&&> (__tuple._C_tail ()))
+        : _Base (_STD::move<_Base&&> (__tuple._C_tail ()))
         , _C_data (_RWSTD_FORWARD (_HeadT, __tuple._C_data)) { /* empty */ }
 
     __rw_tuple& operator= (__rw_tuple&& __tuple) {
@@ -140,7 +146,7 @@
     __rw_tuple (_STD::allocator_arg_t, const _Alloc& __alloc,
                 __rw_tuple<_TypesU...>&& __tuple);
 
-#      endif   // !defined _RWSTD_NO_RVALUE_REFERENCES
+#    endif   // !defined _RWSTD_NO_RVALUE_REFERENCES
 
     template <class _Alloc>
     __rw_tuple (_STD::allocator_arg_t, const _Alloc& __alloc);
@@ -223,13 +229,11 @@
     return false;
 }
 
-#    endif   // !defined _RWSTD_NO_VARIADIC_TEMPLATES
+#  endif   // !defined _RWSTD_NO_VARIADIC_TEMPLATES
 
 
 }   // namespace __rw
 
 
-#  endif   // !defined _RWSTD_NO_EXT_CXX_0X
-
 #endif   // _RWSTD_TUPLE_INCLUDED
 

Modified: stdcxx/branches/4.3.x/include/tuple
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/tuple?rev=673490&r1=673489&r2=673490&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/include/tuple (original)
+++ stdcxx/branches/4.3.x/include/tuple Wed Jul  2 13:48:30 2008
@@ -36,10 +36,12 @@
 #    error _RWSTD_NO_EXT_CXX_0X defined and C++0x header included
 #  endif   // defined _RWSTD_NO_EXT_CXX_0X
 
-#  include <type_traits>
+#  include <rw/_forward.h>          // for _RWSTD_FORWARD, _RWSTD_MOVE
+#  include <rw/_meta_cv.h>          // for _RWSTD_ADD_CONST
+#  include <rw/_meta_help.h>        // for __rw_integral_constant
+#  include <rw/_meta_ref.h>         // for _RWSTD_ADD_LVALUE_REFERENCE
+#  include <rw/_pair.h>             // for std::pair
 
-#  include <rw/_forward.h>
-#  include <rw/_pair.h>
 #  include <rw/_tuple.h>
 
 #  if !defined _RWSTD_NO_VARIADIC_TEMPLATES

Modified: stdcxx/branches/4.3.x/include/utility
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/utility?rev=673490&r1=673489&r2=673490&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/include/utility (original)
+++ stdcxx/branches/4.3.x/include/utility Wed Jul  2 13:48:30 2008
@@ -46,6 +46,11 @@
 
 #include <rw/_pair.h>
 #include <rw/_relops.h>
+
+#ifndef _RWSTD_EXT_CXX_0X
+#  include <rw/_ref_wrap.h>
+#endif
+
 #include <rw/_defs.h>