Author: elemings
Date: Wed Jun 18 11:09:17 2008
New Revision: 669241
URL: http://svn.apache.org/viewvc?rev=669241&view=rev
Log:
2008-06-18 Eric Lemings <[EMAIL PROTECTED]>
STDCXX-958
* include/rw/_forward.h: Include <rw/_defs.h> before checking
configuration macro(s).
* include/rw/_allocator.h (std::allocator_arg_t)
(std::allocator_arg): Define empty C++0x class and global
constant if C++0x extension is enabled.
* include/rw/_tuple.h: Added declarations for user-defined
allocator constructors. Also, assume comiler features include
member templates.
Modified:
stdcxx/branches/4.3.x/include/rw/_allocator.h
stdcxx/branches/4.3.x/include/rw/_forward.h
stdcxx/branches/4.3.x/include/rw/_tuple.h
Modified: stdcxx/branches/4.3.x/include/rw/_allocator.h
URL:
http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_allocator.h?rev=669241&r1=669240&r2=669241&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/include/rw/_allocator.h (original)
+++ stdcxx/branches/4.3.x/include/rw/_allocator.h Wed Jun 18 11:09:17 2008
@@ -63,6 +63,15 @@
_RWSTD_NAMESPACE (std) {
+#ifndef _RWSTD_NO_EXT_CXX_0X
+
+struct allocator_arg_t { };
+
+const allocator_arg_t allocator_arg = allocator_arg_t ();
+
+#endif
+
+
template <class _TypeT> class
allocator;
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=669241&r1=669240&r2=669241&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/include/rw/_forward.h (original)
+++ stdcxx/branches/4.3.x/include/rw/_forward.h Wed Jun 18 11:09:17 2008
@@ -30,9 +30,10 @@
#ifndef _RWSTD_RW_FORWARD_INCLUDED
# define _RWSTD_RW_FORWARD_INCLUDED
+# include <rw/_defs.h>
+
# if !defined _RWSTD_NO_EXT_CXX_0X
-# include <rw/_defs.h>
# include <rw/_meta_ref.h> // for __rw_remove_reference
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=669241&r1=669240&r2=669241&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/include/rw/_tuple.h (original)
+++ stdcxx/branches/4.3.x/include/rw/_tuple.h Wed Jun 18 11:09:17 2008
@@ -37,14 +37,12 @@
# if !defined _RWSTD_NO_EXT_CXX_0X
-# include <rw/_forward.h>
-# include <rw/_pair.h>
-
-# if !defined _RWSTD_NO_VARIADIC_TEMPLATES
+# include <rw/_allocator.h> // for std::allocator_arg_t
+# include <rw/_forward.h> // for std::forward, _RWSTD_MOVE
+# include <rw/_pair.h> // for std::pair
-/// @defgroup tuple Tuples [tuple]
-/// @{
+# if !defined _RWSTD_NO_VARIADIC_TEMPLATES
_RWSTD_NAMESPACE (std) {
@@ -170,8 +168,6 @@
# endif // !defined _RWSTD_NO_RVALUE_REFERENCES
-# if !defined _RWSTD_NO_MEMBER_TEMPLATES
-
/**
* Construct tuple by copying a heterogenous tuple value. This copy
* constructor copies the value from a compatible, heterogenous
@@ -201,10 +197,7 @@
return *this;
}
-# endif // !defined _RWSTD_NO_MEMBER_TEMPLATES
-
-# if !defined _RWSTD_NO_RVALUE_REFERENCES \
- && !defined _RWSTD_NO_MEMBER_TEMPLATES
+# if !defined _RWSTD_NO_RVALUE_REFERENCES
/**
* Construct tuple by moving element values. This explicit move
@@ -248,12 +241,39 @@
return *this;
}
+ // allocator-extended constructors:
+
+ template <class _Alloc, class... _TypesU>
+ tuple (allocator_arg_t, const _Alloc& __alloc,
+ const _TypesU&&... __values);
+
+ template <class _Alloc>
+ tuple (allocator_arg_t, const _Alloc& __alloc,
+ tuple&& __tuple);
+
+ template <class _Alloc, class... _TypesU>
+ tuple (allocator_arg_t, const _Alloc& __alloc,
+ tuple<_TypesU...>&& __tuple);
+
# endif // !defined _RWSTD_NO_RVALUE_REFERENCES
- // && !defined _RWSTD_NO_MEMBER_TEMPLATES
-};
+ template <class _Alloc>
+ tuple (allocator_arg_t, const _Alloc& __alloc);
+
+ template <class _Alloc>
+ tuple (allocator_arg_t, const _Alloc& __alloc,
+ const _HeadT& __head, const _TailT&... __tail);
+
+ template <class _Alloc>
+ tuple (allocator_arg_t, const _Alloc& __alloc,
+ const tuple& __tuple);
+
+ template <class _Alloc, class... _TypesU>
+ tuple (allocator_arg_t, const _Alloc& __alloc,
+ const tuple<_TypesU...>& __tuple);
+
+};
-# if !defined _RWSTD_NO_MEMBER_TEMPLATES
/**
* @internal
@@ -297,7 +317,7 @@
return *this;
}
-# if !defined _RWSTD_NO_RVALUE_REFERENCES
+# if !defined _RWSTD_NO_RVALUE_REFERENCES
template <class _TypeU1, class _TypeU2>
tuple (pair<_TypeU1, _TypeU2>&& __pair)
@@ -311,18 +331,23 @@
return *this;
}
-# endif // !defined _RWSTD_NO_RVALUE_REFERENCES
+ // allocator-extended constructors:
-};
+ template <class _Alloc, class _TypeU1, class _TypeU2>
+ tuple (allocator_arg_t, const _Alloc& __alloc,
+ pair<_TypeU1, _TypeU2>&& __pair);
-# endif // !defined _RWSTD_NO_MEMBER_TEMPLATES
+# endif // !defined _RWSTD_NO_RVALUE_REFERENCES
+
+ template <class _Alloc, class _TypeU1, class _TypeU2>
+ tuple (allocator_arg_t, const _Alloc& __alloc,
+ const pair<_TypeU1, _TypeU2>& __pair);
+};
-/// @}
} // namespace std
-
# endif // !defined _RWSTD_NO_VARIADIC_TEMPLATES
# endif // !defined _RWSTD_NO_EXT_CXX_0X