You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by vi...@apache.org on 2008/06/13 07:53:52 UTC

svn commit: r667365 [1/3] - in /stdcxx/branches/4.3.x: etc/config/src/ include/ include/rw/ tests/utilities/

Author: vitek
Date: Thu Jun 12 22:53:51 2008
New Revision: 667365

URL: http://svn.apache.org/viewvc?rev=667365&view=rev
Log:
2008-06-12  Travis Vitek  <vi...@roguewave.com>

	STDCXX-916
	* include/type_traits: New file defines C++0x type traits.
	* include/rw/_config-gcc.h: Add macros for compiler support.
	* include/rw/_config-msvc.h: Ditto.
	* include/rw/_config.h [_RWSTD_EXT_CXX_OX]: Disable C++0x
	extensions unless defined.
	* include/rw/_defs.h [_RWSTD_SWCHAR_INT_T]: Add new macro that
	defines a type that has same size and layout a the fictional
	signed wchar_t.
	* etc/config/src/STATIC_ASSERT.cpp: Add configuration test to
	check for C++0x static_assert.
	* include/rw/_static_assert.h [_RWSTD_STATIC_ASSERT]: Add a
	helper macro and fallback implementation for static_assert.

	STDCXX-917
	* include/rw/_meta_help.h: New file includes definitions for
	traits classes.
	* tests/utilities/20.meta.help.cpp: Disable all C++0x code unless
	explicitly enabled. Update copyright and comment.

	STDCXX-918
	* include/rw/_meta_cat.h: New file includes definitions for
	trait classes.
	* tests/utilities/20.meta.unary.cat.cpp: Add test.

	STDCXX-919
	* include/rw/_meta_comp.h: New file includes definitions for
	trait classes.
	* tests/utilities/20.meta.unary.comp.cpp: Add test.

	STDCXX-920
	* include/rw/_meta_prop.h: New file includes definitions for
	trait classes.
	* tests/utilities/20.meta.unary.prop.cpp: Add test.

	STDCXX-921
	* include/rw/_meta_rel.h: New file includes definitions for
	trait classes.
	* tests/utilities/20.meta.rel.cpp: Add test.

	STDCXX-922
	* include/rw/_meta_cv.h: New file includes definitions for
	trait classes.
	* tests/utilities/20.meta.trans.cv.cpp: Add test.

	STDCXX-922
	* include/rw/_meta_cv.h: New file includes definitions for
	trait classes.
	* tests/utilities/20.meta.trans.cv.cpp: Add test.

	STDCXX-923
	* include/rw/_meta_ref.h: New file includes definitions for
	trait types.
	* tests/utilities/20.meta.trans.ref.cpp: Add test.

	STDCXX-924
	* include/rw/_meta_arr.h: New file includes definitions for
	traits classes.
	* tests/utilities/20.meta.trans.arr.cpp: Add test.

	STDCXX-925
	* include/rw/_meta_ptr.h: New file includes definitions for
	traits classes.
	* tests/utilities/20.meta.trans.ptr.cpp: Add test.

	STDCXX-926
	* include/rw/_meta_other.h: New file includes definitions for
	traits classes.
	* tests/utilities/20.meta.trans.other.cpp: Add test.

	STDCXX-947
	* include/rw/_meta_sign.h: New file includes definitions for
	traits classes.
	* tests/utilities/20.meta.trans.sign.cpp: Add test.

Added:
    stdcxx/branches/4.3.x/etc/config/src/STATIC_ASSERT.cpp   (with props)
    stdcxx/branches/4.3.x/include/rw/_meta_arr.h   (with props)
    stdcxx/branches/4.3.x/include/rw/_meta_cat.h   (with props)
    stdcxx/branches/4.3.x/include/rw/_meta_comp.h   (with props)
    stdcxx/branches/4.3.x/include/rw/_meta_cv.h   (with props)
    stdcxx/branches/4.3.x/include/rw/_meta_help.h   (with props)
    stdcxx/branches/4.3.x/include/rw/_meta_other.h   (with props)
    stdcxx/branches/4.3.x/include/rw/_meta_prop.h   (with props)
    stdcxx/branches/4.3.x/include/rw/_meta_ptr.h   (with props)
    stdcxx/branches/4.3.x/include/rw/_meta_ref.h   (with props)
    stdcxx/branches/4.3.x/include/rw/_meta_rel.h   (with props)
    stdcxx/branches/4.3.x/include/rw/_meta_sign.h   (with props)
    stdcxx/branches/4.3.x/include/rw/_static_assert.h   (with props)
    stdcxx/branches/4.3.x/tests/utilities/20.meta.rel.cpp   (with props)
    stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.arr.cpp   (with props)
    stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.cv.cpp   (with props)
    stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.other.cpp   (with props)
    stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.ptr.cpp   (with props)
    stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.ref.cpp   (with props)
    stdcxx/branches/4.3.x/tests/utilities/20.meta.trans.sign.cpp   (with props)
    stdcxx/branches/4.3.x/tests/utilities/20.meta.unary.cat.cpp   (with props)
    stdcxx/branches/4.3.x/tests/utilities/20.meta.unary.comp.cpp   (with props)
    stdcxx/branches/4.3.x/tests/utilities/20.meta.unary.prop.cpp   (with props)
Modified:
    stdcxx/branches/4.3.x/include/rw/_config-gcc.h
    stdcxx/branches/4.3.x/include/rw/_config-msvc.h
    stdcxx/branches/4.3.x/include/rw/_config.h
    stdcxx/branches/4.3.x/include/rw/_defs.h
    stdcxx/branches/4.3.x/include/type_traits
    stdcxx/branches/4.3.x/tests/utilities/20.meta.help.cpp

Added: stdcxx/branches/4.3.x/etc/config/src/STATIC_ASSERT.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/etc/config/src/STATIC_ASSERT.cpp?rev=667365&view=auto
==============================================================================
--- stdcxx/branches/4.3.x/etc/config/src/STATIC_ASSERT.cpp (added)
+++ stdcxx/branches/4.3.x/etc/config/src/STATIC_ASSERT.cpp Thu Jun 12 22:53:51 2008
@@ -0,0 +1,46 @@
+// checking for static_assert
+
+/***************************************************************************
+ *
+ * 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 2008 Rogue Wave Software, Inc.
+ * 
+ **************************************************************************/
+
+template <int _N>
+struct S
+{
+    static_assert (0 < _N, "fail");
+};
+
+template <int _N>
+void f ()
+{
+    static_assert (0 < _N, "fail");
+}
+
+static_assert (1, "pass");
+
+int main ()
+{
+    S<1> s1;
+    f<1>();
+    static_assert (1, "pass");
+
+    return 0;
+}

Propchange: stdcxx/branches/4.3.x/etc/config/src/STATIC_ASSERT.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: stdcxx/branches/4.3.x/etc/config/src/STATIC_ASSERT.cpp
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: stdcxx/branches/4.3.x/include/rw/_config-gcc.h
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_config-gcc.h?rev=667365&r1=667364&r2=667365&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/include/rw/_config-gcc.h (original)
+++ stdcxx/branches/4.3.x/include/rw/_config-gcc.h Thu Jun 12 22:53:51 2008
@@ -174,3 +174,31 @@
 #    endif
 #  endif  // __GNUG__ == 3 && __GNUC_MINOR__ < 1
 #endif  // _RWSTD_OS_SUNOS
+
+#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))
+#  define _RWSTD_TT_IS_ENUM(T)                    __is_enum(T)
+#  define _RWSTD_TT_IS_UNION(T)                   __is_union(T)
+#  define _RWSTD_TT_IS_CLASS(T)                   __is_class(T)
+//#  define _RWSTD_TT_IS_FUNCTION(T)                __is_function(T)
+#  define _RWSTD_TT_IS_POD(T)                     __is_pod(T)
+#  define _RWSTD_TT_IS_EMPTY(T)                   __is_empty(T)
+#  define _RWSTD_TT_IS_POLYMORPHIC(T)             __is_polymorphic(T)
+#  define _RWSTD_TT_IS_ABSTRACT(T)                __is_abstract(T)
+#  define _RWSTD_TT_IS_BASE_OF(T,U)               __is_base_of(T,U)
+#  define _RWSTD_TT_IS_CONVERTIBLE(T,U)           __is_convertible(T,U)
+
+#  define _RWSTD_TT_HAS_TRIVIAL_CTOR(T)           __has_trivial_constructor(T)
+#  define _RWSTD_TT_HAS_TRIVIAL_COPY(T)           __has_trivial_copy(T)
+#  define _RWSTD_TT_HAS_TRIVIAL_ASSIGN(T)         __has_trivial_assign(T)
+#  define _RWSTD_TT_HAS_TRIVIAL_DTOR(T)           __has_trivial_destructor(T)
+
+#  define _RWSTD_TT_HAS_NOTHROW_CTOR(T)           __has_nothrow_constructor(T)
+#  define _RWSTD_TT_HAS_NOTHROW_COPY(T)           __has_nothrow_copy(T)
+#  define _RWSTD_TT_HAS_NOTHROW_ASSIGN(T)         __has_nothrow_assign(T)
+
+#  define _RWSTD_TT_HAS_VIRTUAL_DTOR(T)           __has_virtual_destructor(T)
+
+#  define _RWSTD_TT_ALIGN_OF(T)                   __alignof__(T)
+#  define _RWSTD_TT_ALIGNED_POD(N)                struct { char __fill __attribute__ ((aligned (N))); }
+#  define _RWSTD_TT_MAX_ALIGNMENT                 16
+#endif   // __GNUC__ >= 4.3
\ No newline at end of file

Modified: stdcxx/branches/4.3.x/include/rw/_config-msvc.h
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_config-msvc.h?rev=667365&r1=667364&r2=667365&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/include/rw/_config-msvc.h (original)
+++ stdcxx/branches/4.3.x/include/rw/_config-msvc.h Thu Jun 12 22:53:51 2008
@@ -82,3 +82,38 @@
 
 // disable "'function': was declared deprecated"
 #pragma warning (disable: 4996)
+
+// type trait helpers provided by msvc
+#if defined (_MSC_FULL_VER) && (_MSC_FULL_VER >= 140050215)
+#  define _RWSTD_TT_HAS_NOTHROW_ASSIGN(T)  __has_nothrow_assign(T) 
+#  define _RWSTD_TT_HAS_NOTHROW_CTOR(T)    __has_nothrow_constructor(T) 
+#  define _RWSTD_TT_HAS_NOTHROW_COPY(T)    __has_nothrow_copy(T) 
+
+#  define _RWSTD_TT_HAS_TRIVIAL_ASSIGN(T)  __has_trivial_assign(T) 
+#  define _RWSTD_TT_HAS_TRIVIAL_CTOR(T)    __has_trivial_constructor(T) 
+#  define _RWSTD_TT_HAS_TRIVIAL_COPY(T)    __has_trivial_copy(T) 
+#  define _RWSTD_TT_HAS_TRIVIAL_DTOR(T)    __has_trivial_destructor(T) 
+
+#  define _RWSTD_TT_HAS_VIRTUAL_DTOR(T)    __has_virtual_destructor(T) 
+
+#  define _RWSTD_TT_IS_ABSTRACT(T)         __is_abstract(T) 
+#  define _RWSTD_TT_IS_BASE_OF(T,U)        __is_base_of(T,U)
+#  define _RWSTD_TT_IS_CLASS(T)            __is_class(T) 
+#  define _RWSTD_TT_IS_CONVERTIBLE(T,U)    __is_convertible_to(T,U) 
+#  define _RWSTD_TT_IS_EMPTY(T)            __is_empty(T) 
+#  define _RWSTD_TT_IS_ENUM(T)             __is_enum(T) 
+#  define _RWSTD_TT_IS_POLYMORPHIC(T)      __is_polymorphic(T) 
+#  define _RWSTD_TT_IS_UNION(T)            __is_union(T) 
+
+#  define _RWSTD_TT_ALIGN_OF(T)            __alignof(T)
+#  define _RWSTD_TT_ALIGNED_POD(N)         struct { __declspec(align(N)) char __fill; }
+#  define _RWSTD_TT_MAX_ALIGNMENT          16
+//#  define _RWSTD_TT_MAX_ALIGNMENT          8192
+
+// __is_pod only seems to work for pod-class and pod-union types according
+// to the old definition of pod. it needs to exclude scalar types, as well
+// as types which are both trivial and standard layout. so, we work around
+// that by using our fallback.
+#  define _RWSTD_TT_IS_POD(T)              __is_pod(T)
+
+#endif // _MSC_VER
\ No newline at end of file

Modified: stdcxx/branches/4.3.x/include/rw/_config.h
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_config.h?rev=667365&r1=667364&r2=667365&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/include/rw/_config.h (original)
+++ stdcxx/branches/4.3.x/include/rw/_config.h Thu Jun 12 22:53:51 2008
@@ -494,5 +494,9 @@
 #  undef _RWSTD_NO_TEMPLATE_DEFINITIONS
 #endif
 
+#ifndef _RWSTD_EXT_CXX_0X
+   // disable C++0x extensions unless asked to enable them
+#  define _RWSTD_NO_EXT_CXX_0X
+#endif
 
 #endif   // _RWSTD_RW_CONFIG_H_INCLUDED

Modified: stdcxx/branches/4.3.x/include/rw/_defs.h
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_defs.h?rev=667365&r1=667364&r2=667365&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/include/rw/_defs.h (original)
+++ stdcxx/branches/4.3.x/include/rw/_defs.h Thu Jun 12 22:53:51 2008
@@ -1274,6 +1274,20 @@
 #  endif
 #endif   // _RWSTD_SSIZE_T
 
+// _RWSTD_SWCHAR_INT_T is "signed wchar_t"
+#ifndef _RWSTD_SWCHAR_INT_T
+#  if _RWSTD_CHAR_SIZE == _RWSTD_WCHAR_SIZE
+#    define _RWSTD_SWCHAR_INT_T   signed char
+#  elif _RWSTD_SHRT_SIZE == _RWSTD_WCHAR_SIZE
+#    define _RWSTD_SWCHAR_INT_T   signed short
+#  elif _RWSTD_INT_SIZE == _RWSTD_WCHAR_SIZE
+#    define _RWSTD_SWCHAR_INT_T   signed int
+#  elif _RWSTD_LONG_SIZE == _RWSTD_WCHAR_SIZE
+#    define _RWSTD_SWCHAR_INT_T   signed long
+#  else
+#    define _RWSTD_SWCHAR_INT_T   signed long long
+#  endif
+#endif   // _RWSTD_SWCHAR_INT_T
 
 // _RWSTD_UWCHAR_INT_T is "unsigned wchar_t"
 #ifndef _RWSTD_UWCHAR_INT_T
@@ -1283,8 +1297,10 @@
 #    define _RWSTD_UWCHAR_INT_T unsigned short
 #  elif _RWSTD_INT_SIZE == _RWSTD_WCHAR_SIZE
 #    define _RWSTD_UWCHAR_INT_T unsigned int
+#  elif _RWSTD_LONG_SIZE == _RWSTD_WCHAR_SIZE
+#    define _RWSTD_UWCHAR_INT_T unsigned long
 #  else
-#    define _RWSTD_UWCHAR_INT_T _RWSTD_SIZE_T
+#    define _RWSTD_UWCHAR_INT_T unsigned long long
 #  endif
 #endif   // _RWSTD_UWCHAR_INT_T
 
@@ -1615,4 +1631,39 @@
           memcpy (va_dst, va_src, sizeof (va_list))
 #endif   // _RWSTD_NO_VA_LIST_ARRAY
 
+#if 0
+//
+//   http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2518.html
+//
+#  define _RWSTD_TT_IS_MEMBER_OBJECT_POINTER(T)   __is_member_object_pointer(T)
+#  define _RWSTD_TT_IS_MEMBER_FUNCTION_POINTER(T) __is_member_function_pointer(T)
+#  define _RWSTD_TT_IS_ENUM(T)                    __is_enum(T)
+#  define _RWSTD_TT_IS_UNION(T)                   __is_union(T)
+#  define _RWSTD_TT_IS_CLASS(T)                   __is_class(T)
+#  define _RWSTD_TT_IS_FUNCTION(T)                __is_function(T)
+#  define _RWSTD_TT_IS_STANDARD_LAYOUT(T)         __is_standard_layout(T)
+#  define _RWSTD_TT_IS_POD(T)                     __is_pod(T)
+#  define _RWSTD_TT_IS_EMPTY(T)                   __is_empty(T)
+#  define _RWSTD_TT_IS_POLYMORPHIC(T)             __is_polymorphic(T)
+#  define _RWSTD_TT_IS_ABSTRACT(T)                __is_abstract(T)
+
+#  define _RWSTD_TT_HAS_TRIVIAL_CTOR(T)           __has_trivial_default_ctor(T)
+#  define _RWSTD_TT_HAS_TRIVIAL_COPY(T)           __has_trivial_copy_ctor(T)
+#  define _RWSTD_TT_HAS_TRIVIAL_ASSIGN(T)         __has_trivial_assign(T)
+#  define _RWSTD_TT_HAS_TRIVIAL_DTOR(T)           __has_trivial_dtor(T)
+
+#  define _RWSTD_TT_HAS_NOTHROW_CTOR(T)           __has_nothrow_default_ctor(T)
+#  define _RWSTD_TT_HAS_NOTHROW_COPY(T)           __has_nothrow_copy_ctor(T)
+#  define _RWSTD_TT_HAS_NOTHROW_ASSIGN(T)         __has_nothrow_assign(T)
+
+#  define _RWSTD_TT_HAS_VIRTUAL_DTOR(T)           __has_virtual_destructor(T)
+
+#  define _RWSTD_TT_IS_BASE_OF(T)                 __is_base_of(T,U)
+#  define _RWSTD_TT_IS_CONVERTIBLE(T)             __is_convertible(T,U)
+
+#  define _RWSTD_TT_ALIGN_OF(T)                   __alignof(T)
+#  define _RWSTD_TT_ALIGNED_POD(N)                __aligned_pod(N)
+#  define _RWSTD_TT_MAX_ALIGNMENT                 __max_alignment()
+#endif   // 0
+
 #endif   // _RWSTD_RW_DEFS_H_INCLUDED

Added: stdcxx/branches/4.3.x/include/rw/_meta_arr.h
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_meta_arr.h?rev=667365&view=auto
==============================================================================
--- stdcxx/branches/4.3.x/include/rw/_meta_arr.h (added)
+++ stdcxx/branches/4.3.x/include/rw/_meta_arr.h Thu Jun 12 22:53:51 2008
@@ -0,0 +1,109 @@
+/***************************************************************************
+ *
+ * This is an internal header file used to implement the C++ Standard
+ * Library. It should never be #included directly by a program.
+ *
+ * $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 2008 Rogue Wave Software, Inc.
+ *
+ **************************************************************************/
+
+#ifndef _RWSTD_META_TRANS_ARR_H_INCLUDED
+#define _RWSTD_META_TRANS_ARR_H_INCLUDED
+
+#include <rw/_defs.h>
+
+_RWSTD_NAMESPACE (__rw) {
+
+/**
+ * TransformationTrait strips one dimension from an array type, leaving
+ * other types as-is. The primary template is for non-array types.
+ */
+template <class _TypeT>
+struct __rw_remove_extent
+{
+    typedef _TypeT type;
+};
+
+/**
+ * TransformationTrait strips one dimension from an array type, leaving
+ * other types as-is. This specialization is for array types of bounded
+ * size.
+ */
+template <class _TypeT, size_t _Size>
+struct __rw_remove_extent<_TypeT [_Size]>
+{
+    typedef _TypeT type;
+};
+
+/**
+ * TransformationTrait strips one dimension from an array type, leaving
+ * other types as-is. This specialization is for array types of unbounded
+ * size.
+ */
+template <class _TypeT>
+struct __rw_remove_extent<_TypeT []>
+{
+    typedef _TypeT type;
+};
+
+//#define _RWSTD_REMOVE_EXTENT(T) _RW::__rw_remove_extent<T>::type
+
+/**
+ * TransformationTrait strips one dimension from an array type, leaving
+ * other types as-is. The primary template is for non-array types. The
+ * member typedef type will be the same as _TypeT.
+ */
+template <class _TypeT>
+struct __rw_remove_all_extents
+{
+    typedef _TypeT type;
+};
+
+/**
+ * TransformationTrait strips all dimensions from an array type, leaving
+ * other types as-is. This specialization is for array types of bounded
+ * size.
+ */
+template <class _TypeT, size_t _Size>
+struct __rw_remove_all_extents<_TypeT [_Size]>
+{
+    typedef typename __rw_remove_all_extents<_TypeT>::type type;
+};
+
+/**
+ * TransformationTrait strips one dimension from an array type, leaving
+ * other types as-is. This specialization is for array types of unbounded
+ * size.
+ */
+template <class _TypeT>
+struct __rw_remove_all_extents<_TypeT []>
+{
+    typedef typename __rw_remove_all_extents<_TypeT>::type type;
+};
+
+//#define _RWSTD_REMOVE_ALL_EXTENTS(T) _RW::__rw_remove_all_extents<T>::type
+
+} // namespace __rw
+
+
+#endif   // _RWSTD_META_TRANS_ARR_H_INCLUDED

Propchange: stdcxx/branches/4.3.x/include/rw/_meta_arr.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: stdcxx/branches/4.3.x/include/rw/_meta_arr.h
------------------------------------------------------------------------------
    svn:keywords = Id

Added: stdcxx/branches/4.3.x/include/rw/_meta_cat.h
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_meta_cat.h?rev=667365&view=auto
==============================================================================
--- stdcxx/branches/4.3.x/include/rw/_meta_cat.h (added)
+++ stdcxx/branches/4.3.x/include/rw/_meta_cat.h Thu Jun 12 22:53:51 2008
@@ -0,0 +1,353 @@
+/***************************************************************************
+ *
+ * This is an internal header file used to implement the C++ Standard
+ * Library. It should never be #included directly by a program.
+ *
+ * $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 2008 Rogue Wave Software, Inc.
+ *
+ **************************************************************************/
+
+#ifndef _RWSTD_META_UNARY_CAT_H_INCLUDED
+#define _RWSTD_META_UNARY_CAT_H_INCLUDED
+
+#include <rw/_defs.h>
+
+_RWSTD_NAMESPACE (__rw) {
+
+#define _RWSTD_TRAIT_SPEC_0_CV(Trait,Type,Cond)                         \
+    template <> struct Trait<Type>                                      \
+      : __rw_integral_constant<bool, Cond> { };                         \
+    template <> struct Trait<Type const>                                \
+      : __rw_integral_constant<bool, Cond> { };                         \
+    template <> struct Trait<Type volatile>                             \
+      : __rw_integral_constant<bool, Cond> { };                         \
+    template <> struct Trait<Type const volatile>                       \
+      : __rw_integral_constant<bool, Cond> { }
+
+#define _RWSTD_TRAIT_SPEC_1_CV(Trait,Type,Cond)                         \
+    template <class _TypeT> struct Trait<Type>                          \
+      : __rw_integral_constant<bool, Cond> { };                         \
+    template <class _TypeT> struct Trait<Type const>                    \
+      : __rw_integral_constant<bool, Cond> { };                         \
+    template <class _TypeT> struct Trait<Type volatile>                 \
+      : __rw_integral_constant<bool, Cond> { };                         \
+    template <class _TypeT> struct Trait<Type const volatile>           \
+      : __rw_integral_constant<bool, Cond> { }
+
+#define _RWSTD_TRAIT_SPEC_2_CV(Trait,Type,Cond)                         \
+    template <class _TypeT, class _ClassT> struct Trait<Type>           \
+      : __rw_integral_constant<bool, Cond> { };                         \
+    template <class _TypeT, class _ClassT> struct Trait<Type const>     \
+      : __rw_integral_constant<bool, Cond> { };                         \
+    template <class _TypeT, class _ClassT> struct Trait<Type volatile>  \
+      : __rw_integral_constant<bool, Cond> { };                         \
+    template <class _TypeT, class _ClassT>                              \
+    struct Trait<Type const volatile>                                   \
+      : __rw_integral_constant<bool, Cond> { }
+
+/**
+ * UnaryTypeTrait to determine if _TypeT is a (potentially cv-qualified)
+ * void type.
+ */
+template <class _TypeT>
+struct __rw_is_void : __rw_false_type
+{
+};
+
+_RWSTD_TRAIT_SPEC_0_CV(__rw_is_void, void, true);
+
+//#define _RWSTD_IS_VOID(T)                                               \
+//    _RW::__rw_is_void<T>::value
+
+
+/**
+ * UnaryTypeTrait to determine if _TypeT is a (potentially cv-qualified)
+ * integral type. Integral types include bool, char, wchar_t and all of
+ * the signed and unsigned integer types.
+ */
+template <class _TypeT>
+struct __rw_is_integral : __rw_false_type
+{
+};
+
+_RWSTD_TRAIT_SPEC_0_CV(__rw_is_integral, bool, true);
+_RWSTD_TRAIT_SPEC_0_CV(__rw_is_integral, char, true);
+
+#if 0
+_RWSTD_TRAIT_SPEC_0_CV(__rw_is_integral, char16_t, true);
+_RWSTD_TRAIT_SPEC_0_CV(__rw_is_integral, char32_t, true);
+#endif   // 0
+
+#ifndef _RWSTD_NO_NATIVE_WCHAR_T
+_RWSTD_TRAIT_SPEC_0_CV(__rw_is_integral, wchar_t, true);
+#endif   // _RWSTD_NO_NATIVE_WCHAR_T
+
+_RWSTD_TRAIT_SPEC_0_CV(__rw_is_integral,    signed char, true);
+_RWSTD_TRAIT_SPEC_0_CV(__rw_is_integral,  unsigned char, true);
+_RWSTD_TRAIT_SPEC_0_CV(__rw_is_integral,   signed short, true);
+_RWSTD_TRAIT_SPEC_0_CV(__rw_is_integral, unsigned short, true);
+_RWSTD_TRAIT_SPEC_0_CV(__rw_is_integral,     signed int, true);
+_RWSTD_TRAIT_SPEC_0_CV(__rw_is_integral,   unsigned int, true);
+_RWSTD_TRAIT_SPEC_0_CV(__rw_is_integral,    signed long, true);
+_RWSTD_TRAIT_SPEC_0_CV(__rw_is_integral,  unsigned long, true);
+
+#ifndef _RWSTD_NO_LONG_LONG
+_RWSTD_TRAIT_SPEC_0_CV(__rw_is_integral,   signed long long, true);
+_RWSTD_TRAIT_SPEC_0_CV(__rw_is_integral, unsigned long long, true);
+#endif   // _RWSTD_NO_LONG_LONG
+
+//#define _RWSTD_IS_INTEGRAL(T)                                         \
+//    _RW::__rw_is_integral<T>::value
+
+/**
+ * UnaryTypeTrait to determine if _TypeT is a (potentially cv-qualified)
+ * floating point type. The floating point types include float, double
+ * and long double.
+ */
+template <class _TypeT>
+struct __rw_is_floating_point : __rw_false_type
+{
+};
+
+//#define _RWSTD_IS_FLOATING_POINT(T) _RW::__rw_is_floating_point<T>::value
+
+_RWSTD_TRAIT_SPEC_0_CV(__rw_is_floating_point, float, true);
+_RWSTD_TRAIT_SPEC_0_CV(__rw_is_floating_point, double, true);
+
+#ifndef _RWSTD_NO_LONG_DOUBLE
+_RWSTD_TRAIT_SPEC_0_CV(__rw_is_floating_point, long double, true);
+#endif    // _RWSTD_NO_LONG_DOUBLE
+
+//#define _RWSTD_IS_FLOATING_POINT(T)                                   \
+//    _RW::__rw_is_floating_point<T>::value
+
+
+/**
+ * UnaryTypeTrait to determine if _TypeT is an array type.
+ */
+template <class _TypeT>
+struct __rw_is_array : __rw_false_type
+{
+};
+
+template <class _TypeT, _RWSTD_SIZE_T _Size>
+struct __rw_is_array<_TypeT [_Size]> : __rw_true_type
+{
+};
+
+template <class _TypeT>
+struct __rw_is_array<_TypeT []> : __rw_true_type
+{
+};
+
+//#define _RWSTD_IS_ARRAY(T)                                            \
+//    _RW::__rw_is_array<T>::value
+
+/**
+ * UnaryTypeTrait to determine if _TypeT is a (potentially cv-qualified)
+ * pointer type.
+ */
+template <class _TypeT>
+struct __rw_is_pointer : __rw_false_type
+{
+};
+
+_RWSTD_TRAIT_SPEC_1_CV(__rw_is_pointer, _TypeT*, true);
+
+//#define _RWSTD_IS_POINTER(T)                                          \
+//    _RW::__rw_is_pointer<T>::value
+
+
+/**
+ * UnaryTypeTrait to determine if _TypeT is a lval reference type.
+ */
+template <class _TypeT>
+struct __rw_is_lvalue_reference : __rw_false_type
+{
+};
+
+template <class _TypeT>
+struct __rw_is_lvalue_reference<_TypeT&> : __rw_true_type
+{
+};
+
+//#define _RWSTD_IS_LVAL_REF(T)                                         \
+//    _RW::__rw_is_lval_ref<T>::value
+
+/**
+ * UnaryTypeTrait to determine if _TypeT is a rval reference type.
+ */
+template <class _TypeT>
+struct __rw_is_rvalue_reference : __rw_false_type
+{
+};
+
+
+#ifndef _RWSTD_NO_RVALUE_REFERENCES
+
+template <class _TypeT>
+struct __rw_is_rvalue_reference<_TypeT&&> : __rw_true_type
+{
+};
+
+#endif   // _RWSTD_NO_RVALUE_REFERENCES
+
+//#define _RWSTD_IS_RVAL_REF(T)                                         \
+//    _RW::__rw_is_rval_ref<T>::value
+
+/**
+ * Class template can be used to determine if _TypeT is an enumeration.
+ */
+template <class _TypeT>
+struct __rw_is_enum
+    : __rw_integral_constant<bool, _RWSTD_TT_IS_ENUM(_TypeT)>
+{
+};
+
+//#define _RWSTD_IS_ENUM(T)                                             \
+//    _RW::__rw_is_enum<T>::value
+
+/**
+ * UnaryTypeTrait to determine if _TypeT is a union type.
+ */
+template <class _TypeT>
+struct __rw_is_union
+    : __rw_integral_constant<bool, _RWSTD_TT_IS_UNION(_TypeT)>
+{
+};
+
+//#define _RWSTD_IS_UNION(T)                                            \
+//    _RW::__rw_is_union<T>::value
+
+
+/**
+ * UnaryTypeTrait to determine if _TypeT is a class type.
+ */
+template <class _TypeT>
+struct __rw_is_class
+    : __rw_integral_constant<bool, _RWSTD_TT_IS_CLASS(_TypeT)>
+{
+};
+
+//#define _RWSTD_IS_CLASS(T)                                            \
+//    _RW::__rw_is_class<T>::value
+
+
+/**
+ * This template prevents the partial specialization below from
+ * being instantiated on types for which it would fail or give
+ * invalid results. i.e. it avoids creating references to void or
+ * arrays with unknown length and for returning bad results for
+ * references to functions.
+ *
+ * All void, array and reference types are not functions.
+ */
+template <class _TypeT, bool =    __rw_is_void<_TypeT>::value
+                               || __rw_is_array<_TypeT>::value
+                               || __rw_is_lvalue_reference<_TypeT>::value
+                               || __rw_is_rvalue_reference<_TypeT>::value>
+struct __rw_is_function_impl
+{
+    enum { _C_value = 0 };
+};
+
+/**
+ * This specialization determines if _TypeT is a function type. This
+ * is done by testing that a _TypeT is implicitly convertible to a
+ * pointer to _TypeT.
+ *
+ * This special case is only true for functions.
+ */
+template <class _TypeT>
+struct __rw_is_function_impl<_TypeT, false>
+{
+    typedef _TypeT& _TypeT_Ref;
+    typedef _TypeT* _TypeT_Ptr;
+
+    struct _C_no  { };
+    struct _C_yes { _C_no __pad [2]; };
+
+    static _C_yes _C_is (int, _TypeT_Ptr);
+    static _C_no  _C_is (int, ...);
+
+    static _TypeT_Ref _C_make ();
+
+    enum { _C_value = sizeof (_C_yes) == sizeof (_C_is (0, _C_make ())) };
+};
+
+/**
+ * UnaryTypeTrait to determine if _TypeT is a function type.
+ */
+template <class _TypeT>
+struct __rw_is_function
+#ifdef _RWSTD_TT_IS_FUNCTION
+    : __rw_integral_constant<bool, _RWSTD_TT_IS_FUNCTION(_TypeT)>
+#else
+    : __rw_integral_constant<bool, __rw_is_function_impl<_TypeT>::_C_value>
+#endif   // _RWSTD_TT_IS_FUNCTION
+{
+};
+
+//#define _RWSTD_IS_FUNCTION(T)                                         \
+//    _RW::__rw_is_function<T>::value
+
+/**
+ * UnaryTypeTrait to determine if _TypeT is a pointer to member
+ * object type.
+ */
+template <class _TypeT>
+struct __rw_is_member_object_pointer : __rw_false_type
+{
+};
+
+_RWSTD_TRAIT_SPEC_2_CV(__rw_is_member_object_pointer,
+                       _TypeT _ClassT::*,
+                       !__rw_is_function<_TypeT>::value);
+
+//#define _RWSTD_IS_MEMOBJ_PTR(T)                                       \
+//    _RW::__rw_is_member_object_pointer<T>::value
+
+/**
+ * UnaryTypeTrait to determine if _TypeT is a pointer to member
+ * function type.
+ */
+template <class _TypeT>
+struct __rw_is_member_function_pointer : __rw_false_type
+{
+};
+
+_RWSTD_TRAIT_SPEC_2_CV(__rw_is_member_function_pointer,
+                       _TypeT _ClassT::*,
+                       __rw_is_function<_TypeT>::value);
+
+//#define _RWSTD_IS_MEMFUN_PTR(T)                                       \
+//    _RW::__rw_is_member_function_pointer<T>::value
+
+#undef _RWSTD_TRAIT_SPEC_2_CV
+#undef _RWSTD_TRAIT_SPEC_1_CV
+#undef _RWSTD_TRAIT_SPEC_0_CV
+
+} // namespace __rw
+
+
+#endif   // _RWSTD_META_UNARY_CAT_H_INCLUDED

Propchange: stdcxx/branches/4.3.x/include/rw/_meta_cat.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: stdcxx/branches/4.3.x/include/rw/_meta_cat.h
------------------------------------------------------------------------------
    svn:keywords = Id

Added: stdcxx/branches/4.3.x/include/rw/_meta_comp.h
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_meta_comp.h?rev=667365&view=auto
==============================================================================
--- stdcxx/branches/4.3.x/include/rw/_meta_comp.h (added)
+++ stdcxx/branches/4.3.x/include/rw/_meta_comp.h Thu Jun 12 22:53:51 2008
@@ -0,0 +1,147 @@
+/***************************************************************************
+ *
+ * This is an internal header file used to implement the C++ Standard
+ * Library. It should never be #included directly by a program.
+ *
+ * $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 2008 Rogue Wave Software, Inc.
+ *
+ **************************************************************************/
+
+#ifndef _RWSTD_META_UNARY_COMP_H_INCLUDED
+#define _RWSTD_META_UNARY_COMP_H_INCLUDED
+
+#include <rw/_defs.h>
+#include <rw/_meta_cat.h>
+
+_RWSTD_NAMESPACE (__rw) {
+
+/**
+ * UnaryTypeTrait indicates that _TypeT is either a lval or
+ * rval reference type.
+ */
+template <class _TypeT>
+struct __rw_is_reference
+    : __rw_integral_constant<bool,    __rw_is_lvalue_reference<_TypeT>::value
+                                   || __rw_is_rvalue_reference<_TypeT>::value>
+{
+};
+
+/**
+ * UnaryTypeTrait indicates that _TypeT is an arithmethic type.
+ *
+ * The arithmetic types include all integral and floating point
+ * types.
+ */
+template <class _TypeT>
+struct __rw_is_arithmetic
+    : __rw_integral_constant<bool,    __rw_is_integral<_TypeT>::value
+                                   || __rw_is_floating_point<_TypeT>::value>
+{
+};
+
+/**
+ * UnaryTypeTrait indicates that _TypeT is an fundamental type.
+ *
+ * The fundamental types include void and all of the standard
+ * arithmetic types.
+ */
+template <class _TypeT>
+struct __rw_is_fundamental
+    : __rw_integral_constant<bool,    __rw_is_void<_TypeT>::value
+                                   || __rw_is_arithmetic<_TypeT>::value>
+{
+};
+
+
+/**
+ * UnaryTypeTrait indicates that _TypeT is an object type.
+ *
+ * An object is a (possibly cv-qualified) type that is not a
+ * function type, not a reference type, and not a void type.
+ */
+template <class _TypeT>
+struct __rw_is_object
+    : __rw_integral_constant<bool,    !__rw_is_function<_TypeT>::value
+                                   && !__rw_is_reference<_TypeT>::value
+                                   && !__rw_is_void<_TypeT>::value>
+{
+};
+
+/**
+ * UnaryTypeTrait indicates that _TypeT is a member pointer type.
+ *
+ * The member pointer types include pointers to member functions and
+ * pointer to member data. Neither pointers to static member functions
+ * or pointers to static member data are included.
+ */
+template <class _TypeT>
+struct __rw_is_member_pointer
+    : __rw_integral_constant<bool,    __rw_is_member_function_pointer<_TypeT>::value
+                                   || __rw_is_member_object_pointer<_TypeT>::value>
+{
+};
+
+/**
+ * UnaryTypeTrait indicates that _TypeT is a scalar type.
+ *
+ * The scalar types include arithmetic types, enumeration types,
+ * pointer types, pointer to member types, std::nullptr_t and
+ * cv-qualified versions of these types.
+ */
+template <class _TypeT>
+struct __rw_is_scalar
+    : __rw_integral_constant<bool,    __rw_is_arithmetic<_TypeT>::value
+                                   || __rw_is_enum<_TypeT>::value
+                                   || __rw_is_pointer<_TypeT>::value
+                                   || __rw_is_member_pointer<_TypeT>::value>
+{
+    /**
+     * todo need to handle special case
+     *
+     * __rw_is_same<std::nullptr_t, __rw_remove_cv<_TypeT>::type>::value
+     */
+};
+
+/**
+ * UnaryTypeTrait indicates that _TypeT is a compound type.
+ *
+ * The compound types include arrays, functions, pointers, references,
+ * classes, unions, enumerations, pointer to non-static class members
+ */
+template <class _TypeT>
+struct __rw_is_compound
+    : __rw_integral_constant<bool,    __rw_is_array<_TypeT>::value
+                                   || __rw_is_function<_TypeT>::value
+                                   || __rw_is_pointer<_TypeT>::value
+                                   || __rw_is_reference<_TypeT>::value
+                                   || __rw_is_class<_TypeT>::value
+                                   || __rw_is_union<_TypeT>::value
+                                   || __rw_is_enum<_TypeT>::value
+                                   || __rw_is_member_pointer<_TypeT>::value>
+{
+};
+
+} // namespace __rw
+
+
+#endif   // _RWSTD_META_UNARY_COMP_H_INCLUDED

Propchange: stdcxx/branches/4.3.x/include/rw/_meta_comp.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: stdcxx/branches/4.3.x/include/rw/_meta_comp.h
------------------------------------------------------------------------------
    svn:keywords = Id

Added: stdcxx/branches/4.3.x/include/rw/_meta_cv.h
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_meta_cv.h?rev=667365&view=auto
==============================================================================
--- stdcxx/branches/4.3.x/include/rw/_meta_cv.h (added)
+++ stdcxx/branches/4.3.x/include/rw/_meta_cv.h Thu Jun 12 22:53:51 2008
@@ -0,0 +1,162 @@
+/***************************************************************************
+ *
+ * This is an internal header file used to implement the C++ Standard
+ * Library. It should never be #included directly by a program.
+ *
+ * $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 2008 Rogue Wave Software, Inc.
+ *
+ **************************************************************************/
+
+#ifndef _RWSTD_META_TRANS_CV_H_INCLUDED
+#define _RWSTD_META_TRANS_CV_H_INCLUDED
+
+#include <rw/_defs.h>
+#include <rw/_meta_cat.h>
+
+_RWSTD_NAMESPACE (__rw) {
+
+/**
+ * TransformationTrait strips any top level const-qualifier from _TypeT.
+ *
+ * The primary template is for non-const types.
+ */
+template <class _TypeT>
+struct __rw_remove_const
+{
+    typedef _TypeT type;
+};
+
+/**
+ * TransformationTrait strips any top level const-qualifier from _TypeT.
+ *
+ * This specialization is for const types.
+ */
+template <class _TypeT>
+struct __rw_remove_const<const _TypeT>
+{
+    typedef _TypeT type;
+};
+
+
+/**
+ * TransformationTrait strips any top level volatile-qualifier from _TypeT.
+ *
+ * The primary template is for non-volatile types.
+ */
+template <class _TypeT>
+struct __rw_remove_volatile
+{
+    typedef _TypeT type;
+};
+
+/**
+ * TransformationTrait strips any top level volatile-qualifier from _TypeT.
+ *
+ * This specialization is for volatile types.
+ */
+template <class _TypeT>
+struct __rw_remove_volatile<volatile _TypeT>
+{
+    typedef _TypeT type;
+};
+
+/**
+ * TransformationTrait strips top level cv-qualifiers from _TypeT.
+ */
+template <class _TypeT>
+struct __rw_remove_cv
+{
+    typedef typename __rw_remove_const<
+        typename __rw_remove_volatile<_TypeT>::type
+    >::type type;
+};
+
+template <class _TypeT, bool =   __rw_is_function<_TypeT>::value
+                              || __rw_is_reference<_TypeT>::value>
+struct __rw_add_const_impl
+{
+    typedef _TypeT _C_type;
+};
+
+template <class _TypeT>
+struct __rw_add_const_impl<_TypeT, false>
+{
+    typedef const _TypeT _C_type;
+};
+
+/**
+ * TransformationTrait adds a top level const qualifier to _TypeT.
+ *
+ * If _TypeT is a reference, function, or top-level const-qualified
+ * type, then type shall name the same type as _TypeT otherwise it
+ * shall name const _TypeT.
+ */
+template <class _TypeT>
+struct __rw_add_const
+{
+    typedef typename __rw_add_const_impl<_TypeT>::_C_type type;
+};
+
+
+template <class _TypeT, bool =   __rw_is_function<_TypeT>::value
+                              || __rw_is_reference<_TypeT>::value>
+struct __rw_add_volatile_impl
+{
+    typedef _TypeT _C_type;
+};
+
+template <class _TypeT>
+struct __rw_add_volatile_impl<_TypeT, false>
+{
+    typedef volatile _TypeT _C_type;
+};
+
+/**
+ * TransformationTrait adds a top level volatile qualifier to _TypeT.
+ *
+ * If _TypeT is a reference, function, or top-level volatile-qualified
+ * type, then type shall name the same type as _TypeT otherwise it
+ * shall name volatile _TypeT.
+ */
+template <class _TypeT>
+struct __rw_add_volatile
+{
+    typedef typename __rw_add_volatile_impl<_TypeT>::_C_type type;
+};
+
+/**
+ * Trait adds top level cv-qualifiers to _TypeT.
+ */
+template <class _TypeT>
+struct __rw_add_cv
+{
+    typedef typename
+    __rw_add_const<
+        typename __rw_add_volatile<_TypeT>::type
+    >::type type;
+};
+
+} // namespace __rw
+
+
+#endif   // _RWSTD_META_TRANS_CV_H_INCLUDED

Propchange: stdcxx/branches/4.3.x/include/rw/_meta_cv.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: stdcxx/branches/4.3.x/include/rw/_meta_cv.h
------------------------------------------------------------------------------
    svn:keywords = Id

Added: stdcxx/branches/4.3.x/include/rw/_meta_help.h
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_meta_help.h?rev=667365&view=auto
==============================================================================
--- stdcxx/branches/4.3.x/include/rw/_meta_help.h (added)
+++ stdcxx/branches/4.3.x/include/rw/_meta_help.h Thu Jun 12 22:53:51 2008
@@ -0,0 +1,79 @@
+/***************************************************************************
+ *
+ * This is an internal header file used to implement the C++ Standard
+ * Library. It should never be #included directly by a program.
+ *
+ * $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 2008 Rogue Wave Software, Inc.
+ *
+ **************************************************************************/
+
+#ifndef _RWSTD_META_HELP_H_INCLUDED
+#define _RWSTD_META_HELP_H_INCLUDED
+
+#include <rw/_defs.h>
+
+_RWSTD_NAMESPACE (__rw) {
+
+/**
+ *
+ */
+template <class _TypeT, _TypeT _Value>
+struct __rw_integral_constant
+{
+    /**
+     * Describes the type of this integral_constant.
+     */
+    typedef __rw_integral_constant<_TypeT,_Value> type;
+
+    /**
+     * Describes the type of the value defined by this integral_constant.
+     */
+    typedef _TypeT value_type;
+
+    /**
+     * The actual integral constant value.
+     */
+    static const _TypeT value = _Value;
+};
+
+#ifndef _RWSTD_NO_STATIC_CONST_MEMBER_DEFINITION
+
+template<class _TypeT, _TypeT _Value>
+const _TypeT __rw_integral_constant<_TypeT, _Value>::value;
+
+#endif    // _RWSTD_NO_STATIC_CONST_MEMBER_DEFINITION
+
+/**
+ *
+ */
+typedef __rw_integral_constant<bool, true>  __rw_true_type;
+
+/**
+ *
+ */
+typedef __rw_integral_constant<bool, false> __rw_false_type;
+
+} // namespace __rw
+
+
+#endif   // _RWSTD_META_HELP_H_INCLUDED

Propchange: stdcxx/branches/4.3.x/include/rw/_meta_help.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: stdcxx/branches/4.3.x/include/rw/_meta_help.h
------------------------------------------------------------------------------
    svn:keywords = Id

Added: 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=667365&view=auto
==============================================================================
--- stdcxx/branches/4.3.x/include/rw/_meta_other.h (added)
+++ stdcxx/branches/4.3.x/include/rw/_meta_other.h Thu Jun 12 22:53:51 2008
@@ -0,0 +1,256 @@
+/***************************************************************************
+ *
+ * This is an internal header file used to implement the C++ Standard
+ * Library. It should never be #included directly by a program.
+ *
+ * $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 2008 Rogue Wave Software, Inc.
+ *
+ **************************************************************************/
+
+#ifndef _RWSTD_META_OTHER_H_INCLUDED
+#define _RWSTD_META_OTHER_H_INCLUDED
+
+#include <rw/_defs.h>
+#include <rw/_meta_cat.h>
+#include <rw/_meta_ref.h>
+#include <rw/_meta_ptr.h>
+
+_RWSTD_NAMESPACE (__rw) {
+
+template <_RWSTD_SIZE_T _Align>
+struct __rw_aligned_storage_impl;
+
+template <>
+struct __rw_aligned_storage_impl<1>
+{
+    _RWSTD_UINT_LEAST8_T _C_type;
+};
+
+template <>
+struct __rw_aligned_storage_impl<2>
+{
+    _RWSTD_UINT_LEAST16_T _C_type;
+};
+
+template <>
+struct __rw_aligned_storage_impl<3>
+{
+    _RWSTD_UINT_LEAST32_T _C_type;
+};
+
+template <>
+struct __rw_aligned_storage_impl<4>
+{
+    _RWSTD_UINT_LEAST32_T _C_type;
+};
+
+template <_RWSTD_SIZE_T _Len, _RWSTD_SIZE_T _Align = 4>
+struct __rw_aligned_storage
+{
+    // the member typedef _C_type shall be a pod-type suitable for
+    // use as uninitialized storage for any object whose size is at
+    // most _Len and whose alignment is a divisor of _Align.
+    //
+    // i think they mean divisible by _Align. i.e. if _Align is 4, we
+    // could return 4, 8 or 16 byte aligned data, but we could not
+    // return 1 byte aligned data.        
+    union {
+        unsigned char __data [_Len];
+        typename __rw_aligned_storage_impl<_Align>::_C_type __align;
+    } type;
+};
+
+
+#ifndef _RWSTD_NO_VARIADIC_TEMPLATES
+
+template <_RWSTD_SIZE_T _Len, class... Types>
+struct __rw_aligned_union_impl;
+
+template <_RWSTD_SIZE_T _Len, class Type, class... Types>
+struct __rw_aligned_union_impl<_Len, Type, Types...>
+{
+    union {
+        unsigned char __pad [_Len];
+        typename __rw_aligned_union<_Len, Types...>::_C_type __align;
+    } _C_type;
+};
+
+template <_RWSTD_SIZE_T _Len>
+struct __rw_aligned_union_impl<_Len>
+{
+    union {
+        unsigned char __pad [_Len];
+    } _C_type;
+};
+
+template <_RWSTD_SIZE_T _Len, class... Types>
+struct __rw_aligned_union
+{
+    typedef typename
+    __rw_aligned_union_impl<_Len, Types...>::_C_type type;
+};
+
+#else // _RWSTD_NO_VARIADIC_TEMPLATES
+
+struct __rw_empty { };
+
+template <_RWSTD_SIZE_T _Len,
+          class _Type1 = __rw_empty, class _Type2 = __rw_empty,
+          class _Type3 = __rw_empty, class _Type4 = __rw_empty,
+          class _Type5 = __rw_empty, class _Type6 = __rw_empty,
+          class _Type7 = __rw_empty, class _Type8 = __rw_empty>
+struct __rw_aligned_union
+{
+    union {
+        unsigned char __pad [_Len];
+        _Type1 __object1;
+        _Type2 __object2;
+        _Type3 __object3;
+        _Type4 __object4;
+        _Type5 __object5;
+        _Type6 __object6;
+        _Type7 __object7;
+        _Type8 __object8;
+    } type;
+};
+
+#endif // !_RWSTD_NO_VARIADIC_TEMPLATES
+
+/**
+ * Conditional primitive that provides a member typedef type that is
+ * _TypeT if _Enable is true, otherwise there will be no such typedef.
+ *
+ * The primary template provides an implementation for the case that
+ * _Enable is true.
+ */
+template <bool _Enable, class _TypeT = void>
+struct __rw_enable_if
+{
+    typedef _TypeT type;
+};
+
+/**
+ * Conditional primitive that provides a member typedef type that is
+ * _TypeT if _Enable is true, otherwise there will be no such typedef.
+ *
+ * The specialization provides an implementation for the case that _Enable
+ * is false.
+ */
+template <class _TypeT>
+struct __rw_enable_if<false, _TypeT>
+{
+};
+
+//#define _RWSTD_ENABLE_IF(C,T) _RW::__rw_enable_if<C,T>::type
+
+/**
+ * Conditional primitive that provides a member typedef type that is
+ * _TypeT if _Enable is false, otherwise there will be no such typedef.
+ *
+ * The primary template provides an implementation for the case that
+ * _Enable is false.
+ */
+template <bool _Enable, class _TypeT = void>
+struct __rw_disable_if
+{
+    typedef _TypeT type;
+};
+
+/**
+ * Conditional primitive that provides a member typedef type that is
+ * _TypeT if _Enable is false, otherwise there will be no such typedef.
+ *
+ * The specialization provides an implementation for the case that _Enable
+ * is false.
+ */
+template <class _TypeT>
+struct __rw_disable_if<true, _TypeT>
+{
+};
+
+//#define _RWSTD_DISABLE_IF(C,T) _RW::__rw_disable_if<C,T>::type
+
+/**
+ * Metaprogramming conditional primitive that provides a member typedef
+ * _C_type that is _TypeT if _Select is true, otherwise is _TypeU.
+ *
+ * The primary template is used when _Select is true.
+ */
+template <bool _Select, class _TypeT, class _TypeU>
+struct __rw_conditional
+{
+    typedef _TypeT type;
+};
+
+/**
+ * Metaprogramming conditional primitive that provides a member typedef
+ * type is _TypeT if _Select is true, otherwise is _TypeU.
+ *
+ * This specialization if used when _Select is false.
+ */
+template <class _TypeT, class _TypeU>
+struct __rw_conditional<false, _TypeT, _TypeU>
+{
+    typedef _TypeU type;
+};
+
+//#define _RWSTD_CONDITIONAL(C,T,U) _RW::__rw_conditional<C,T,U>::type
+
+/**
+ * TransformationTrait that implements compile time array-to-pointer
+ * conversions and function-to-pointer conversions for the given type
+ * _TypeT.
+ *
+ * Let _TypeU be __rw_remove_ref<_TypeT>::type. If _TypeT is an
+ * array type, the member typedef type shall equal to the type of
+ * __rw_remove_extent<_TypeU>::type*. If _TypeT is a function type,
+ * the member typedef type shall be __rw_add_ptr<_TypeU>::type.
+ * Otherwise type will be __rw_remove_cv<_TypeU>::type.
+ */
+template <class _TypeT>
+struct __rw_decay
+{
+private:
+    typedef typename
+    __rw_remove_reference<_TypeT>::type _TypeU;
+
+    typedef typename
+    __rw_conditional<__rw_is_function<_TypeU>::value,
+                     typename __rw_add_pointer<_TypeU>::type,
+                     typename __rw_remove_cv<_TypeU>::type
+                    >::type _TypeV;
+
+public:
+    typedef typename
+    __rw_conditional<__rw_is_array<_TypeU>::value,
+                     typename __rw_remove_extent<_TypeU>::type*,
+                     _TypeV
+                    >::type type;
+};
+
+//#define _RWSTD_DECAY(T) _RW::__rw_decay<T>::type
+
+} // namespace __rw
+
+
+#endif   // _RWSTD_META_OTHER_H_INCLUDED

Propchange: stdcxx/branches/4.3.x/include/rw/_meta_other.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: stdcxx/branches/4.3.x/include/rw/_meta_other.h
------------------------------------------------------------------------------
    svn:keywords = Id

Added: stdcxx/branches/4.3.x/include/rw/_meta_prop.h
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_meta_prop.h?rev=667365&view=auto
==============================================================================
--- stdcxx/branches/4.3.x/include/rw/_meta_prop.h (added)
+++ stdcxx/branches/4.3.x/include/rw/_meta_prop.h Thu Jun 12 22:53:51 2008
@@ -0,0 +1,490 @@
+/***************************************************************************
+ *
+ * This is an internal header file used to implement the C++ Standard
+ * Library. It should never be #included directly by a program.
+ *
+ * $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 2008 Rogue Wave Software, Inc.
+ *
+ **************************************************************************/
+
+#ifndef _RWSTD_META_UNARY_PROP_H_INCLUDED
+#define _RWSTD_META_UNARY_PROP_H_INCLUDED
+
+#include <rw/_defs.h>
+#include <rw/_meta_cat.h>
+#include <rw/_meta_arr.h>
+#include <rw/_meta_cv.h>
+#include <rw/_static_assert.h>
+
+_RWSTD_NAMESPACE (__rw) {
+
+template <class _TypeT, bool = __rw_is_integral<_TypeT>::value,
+                        bool = __rw_is_floating_point<_TypeT>::value>
+struct __rw_is_unsigned_impl
+{
+    enum { _C_value = 0 };
+};
+
+template <class _TypeT>
+struct __rw_is_unsigned_impl<_TypeT, false, true>
+{
+    enum { _C_value = 0 };
+};
+
+template <class _TypeT>
+struct __rw_is_unsigned_impl<_TypeT, true, false>
+{
+    typedef typename __rw_remove_cv<_TypeT>::type _TypeU;
+    enum { _C_value = _TypeU (0) < _TypeU (-1) };
+};
+
+template <class _TypeT, bool = __rw_is_integral<_TypeT>::value,
+                        bool = __rw_is_floating_point<_TypeT>::value>
+struct __rw_is_signed_impl
+{
+    enum { _C_value = 0 };
+};
+
+template <class _TypeT>
+struct __rw_is_signed_impl<_TypeT, false, true>
+{
+    enum { _C_value = 1 };
+};
+
+template <class _TypeT>
+struct __rw_is_signed_impl<_TypeT, true, false>
+{
+    typedef typename __rw_remove_cv<_TypeT>::type _TypeU;
+    enum { _C_value = _TypeU (-1) < _TypeU (0) };
+};
+
+
+
+/**
+ * UnaryTypeTrait indicates that _TypeT is const-qualified.
+ */
+template <class _TypeT>
+struct __rw_is_const : __rw_false_type
+{
+};
+
+template <class _TypeT>
+struct __rw_is_const<const _TypeT> : __rw_true_type
+{
+};
+
+/**
+ * UnaryTypeTrait indicates that _TypeT is volatile-qualified.
+ */
+template <class _TypeT>
+struct __rw_is_volatile : __rw_false_type
+{
+};
+
+template <class _TypeT>
+struct __rw_is_volatile<volatile _TypeT> : __rw_true_type
+{
+};
+
+
+#ifdef _MSC_VER
+
+// msvc hacks
+
+template <class _TypeT>
+struct __rw_is_standard_layout_impl
+{
+    typedef typename __rw_remove_all_extents<_TypeT>::type _TypeU;
+    enum { _C_value = __rw_is_scalar<_TypeU>::value };
+};
+
+template <class _TypeT>
+struct __rw_is_pod_impl
+{
+    typedef typename __rw_remove_all_extents<_TypeT>::type _TypeU;
+
+    enum { _C_value =    __rw_is_scalar<_TypeU>::value
+#ifdef _RWSTD_TT_IS_POD
+                      || _RWSTD_TT_IS_POD(_TypeU)
+#endif
+    };
+};
+
+template <class _TypeT>
+struct __rw_is_empty_impl
+{
+    enum { _C_value =    __rw_is_class<_TypeT>::value
+#ifdef _RWSTD_TT_IS_EMPTY
+                      && _RWSTD_TT_IS_EMPTY(_TypeT)
+#endif
+    };
+};
+
+#undef _RWSTD_TT_IS_STDANDARD_LAYOUT
+#define _RWSTD_TT_IS_STDANDARD_LAYOUT(T) __rw_is_standard_layout_impl<T>::_C_value
+
+#undef _RWSTD_TT_IS_POD
+#define _RWSTD_TT_IS_POD(T) __rw_is_pod_impl<T>::_C_value
+
+#undef _RWSTD_TT_IS_EMPTY
+#define _RWSTD_TT_IS_EMPTY(T) __rw_is_empty_impl<T>::_C_value
+
+#endif // _MSC_VER
+
+
+
+
+
+/**
+ * UnaryTypeTrait indicates that _TypeT is a standard layout type.
+ *
+ * _TypeT shall be a complete type, an array of unknown bound, or void
+ * (possibly cv-qualified)
+ */
+template <class _TypeT>
+struct __rw_is_standard_layout
+    : __rw_integral_constant<bool, _RWSTD_TT_IS_STDANDARD_LAYOUT(_TypeT)>
+{
+    //_RWSTD_COMPILE_ASSERT (   _RWSTD_IS_COMPLETE (_TypeT)
+    //                       || _RWSTD_IS_ARRAY (_TypeT)
+    //                       || _RWSTD_IS_VOID (_TypeT));
+};
+
+/**
+ * UnaryTypeTrait indicates that _TypeT is a pod type.
+ *
+ * _TypeT shall be a complete type, an array of unknown bound, or void
+ * (possibly cv-qualified)
+ */
+template <class _TypeT>
+struct __rw_is_pod
+    : __rw_integral_constant<bool, _RWSTD_TT_IS_POD(_TypeT)>
+{
+    //_RWSTD_COMPILE_ASSERT (   _RWSTD_IS_COMPLETE (_TypeT)
+    //                       || _RWSTD_IS_ARRAY (_TypeT)
+    //                       || _RWSTD_IS_VOID (_TypeT));
+};
+
+/**
+ * UnaryTypeTrait indicates that _TypeT is an empty type.
+ *
+ * _TypeT shall be a complete type, an array of unknown bound, or void
+ * (possibly cv-qualified).
+ */
+template <class _TypeT>
+struct __rw_is_empty
+    : __rw_integral_constant<bool, _RWSTD_TT_IS_EMPTY(_TypeT)>
+{
+    //_RWSTD_COMPILE_ASSERT (   _RWSTD_IS_COMPLETE (_TypeT)
+    //                       || _RWSTD_IS_ARRAY (_TypeT)
+    //                       || _RWSTD_IS_VOID (_TypeT));
+};
+
+/**
+ * UnaryTypeTrait indicates that _TypeT is a polymorphic type.
+ *
+ * _TypeT shall be a complete type, an array of unknown bound, or void
+ * (possibly cv-qualified).
+ */
+template <class _TypeT>
+struct __rw_is_polymorphic
+    : __rw_integral_constant<bool, _RWSTD_TT_IS_POLYMORPHIC(_TypeT)>
+{
+    //_RWSTD_COMPILE_ASSERT (   _RWSTD_IS_COMPLETE (_TypeT)
+    //                       || _RWSTD_IS_ARRAY (_TypeT)
+    //                       || _RWSTD_IS_VOID (_TypeT));
+};
+
+/**
+ * UnaryTypeTrait indicates that _TypeT is an abstract type.
+ *
+ * _TypeT shall be a complete type, an array of unknown bound, or void
+ * (possibly cv-qualified).
+ */
+template <class _TypeT>
+struct __rw_is_abstract
+    : __rw_integral_constant<bool, _RWSTD_TT_IS_ABSTRACT(_TypeT)>
+{
+    //_RWSTD_COMPILE_ASSERT (   _RWSTD_IS_COMPLETE (_TypeT)
+    //                       || _RWSTD_IS_ARRAY (_TypeT)
+    //                       || _RWSTD_IS_VOID (_TypeT));
+};
+
+/**
+ * UnaryTypeTrait indicates that _TypeT has a trivial default constructor.
+ *
+ * _TypeT shall be a complete type, an array of unknown bound, or void
+ * (possibly cv-qualified).
+ */
+template <class _TypeT>
+struct __rw_has_trivial_ctor
+    : __rw_integral_constant<bool, _RWSTD_TT_HAS_TRIVIAL_CTOR(_TypeT)>
+{
+    //_RWSTD_COMPILE_ASSERT (   _RWSTD_IS_COMPLETE (_TypeT)
+    //                       || _RWSTD_IS_ARRAY (_TypeT)
+    //                       || _RWSTD_IS_VOID (_TypeT));
+};
+
+/**
+ * UnaryTypeTrait indicates that _TypeT has a trivial copy constructor.
+ *
+ * _TypeT shall be a complete type, an array of unknown bound, or void
+ * (possibly cv-qualified).
+ */
+template <class _TypeT>
+struct __rw_has_trivial_copy
+    : __rw_integral_constant<bool, _RWSTD_TT_HAS_TRIVIAL_COPY(_TypeT)>
+{
+    //_RWSTD_COMPILE_ASSERT (   _RWSTD_IS_COMPLETE (_TypeT)
+    //                       || _RWSTD_IS_ARRAY (_TypeT)
+    //                       || _RWSTD_IS_VOID (_TypeT));
+};
+
+/**
+ * UnaryTypeTrait indicates that _TypeT has a trivial assignment operator.
+ *
+ * _TypeT shall be a complete type, an array of unknown bound, or void
+ * (possibly cv-qualified).
+ */
+template <class _TypeT>
+struct __rw_has_trivial_assign
+    : __rw_integral_constant<bool, _RWSTD_TT_HAS_TRIVIAL_ASSIGN(_TypeT)>
+{
+    //_RWSTD_COMPILE_ASSERT (   _RWSTD_IS_COMPLETE (_TypeT)
+    //                       || _RWSTD_IS_ARRAY (_TypeT)
+    //                       || _RWSTD_IS_VOID (_TypeT));
+};
+
+/**
+ * UnaryTypeTrait indicates that _TypeT has a trivial destructor.
+ *
+ * _TypeT shall be a complete type, an array of unknown bound, or void
+ * (possibly cv-qualified).
+ */
+template <class _TypeT>
+struct __rw_has_trivial_dtor
+    : __rw_integral_constant<bool, _RWSTD_TT_HAS_TRIVIAL_DTOR(_TypeT)>
+{
+    //_RWSTD_COMPILE_ASSERT (   _RWSTD_IS_COMPLETE (_TypeT)
+    //                       || _RWSTD_IS_ARRAY (_TypeT)
+    //                       || _RWSTD_IS_VOID (_TypeT));
+};
+
+/**
+ * UnaryTypeTrait indicates that _TypeT is a trivial type or
+ * an array of trivial type.
+ */
+template <class _TypeT>
+struct __rw_is_trivial_impl
+{
+    typedef typename __rw_remove_all_extents<_TypeT>::type _TypeU;
+
+    enum { _C_value =    __rw_is_scalar<_TypeU>::value
+                      || __rw_has_trivial_ctor<_TypeU>::value
+                      && __rw_has_trivial_copy<_TypeU>::value
+                      && __rw_has_trivial_dtor<_TypeU>::value
+                      && __rw_has_trivial_assign<_TypeU>::value
+                      && (__rw_is_class<_TypeU>::value || __rw_is_union<_TypeU>::value) };
+};
+
+/**
+ * UnaryTypeTrait indicates that _TypeT is a trivial type or an array of
+ * trivial type.
+ *
+ * Trivial types include scalar types, and trivial class types. A trivial
+ * class type has a trivial default ctor, copy ctor, operator= and dtor.
+ *
+ * _TypeT shall be a complete type, an array of unknown bound, or void
+ * (possibly cv-qualified).
+ */
+template <class _TypeT>
+struct __rw_is_trivial
+    : __rw_integral_constant<bool, __rw_is_trivial_impl<_TypeT>::_C_value>
+{
+    //_RWSTD_COMPILE_ASSERT (   _RWSTD_IS_COMPLETE (_TypeT)
+    //                       || _RWSTD_IS_ARRAY (_TypeT)
+    //                       || _RWSTD_IS_VOID (_TypeT));
+};
+
+/**
+ * UnaryTypeTrait to determine if _TypeT has a nothrow default constructor.
+ *
+ * _TypeT shall be a complete type, an array of unknown bound, or void
+ * (possibly cv-qualified).
+ */
+template <class _TypeT>
+struct __rw_has_nothrow_ctor
+    : __rw_integral_constant<bool, _RWSTD_TT_HAS_NOTHROW_CTOR(_TypeT)>
+{
+    //_RWSTD_COMPILE_ASSERT (   _RWSTD_IS_COMPLETE (_TypeT)
+    //                       || _RWSTD_IS_ARRAY (_TypeT)
+    //                       || _RWSTD_IS_VOID (_TypeT));
+};
+
+/**
+ * UnaryTypeTrait indicates that _TypeT has a nothrow copy constructor.
+ *
+ * _TypeT shall be a complete type, an array of unknown bound, or void
+ * (possibly cv-qualified).
+ */
+template <class _TypeT>
+struct __rw_has_nothrow_copy
+    : __rw_integral_constant<bool, _RWSTD_TT_HAS_NOTHROW_COPY(_TypeT)>
+{
+    //_RWSTD_COMPILE_ASSERT (   _RWSTD_IS_COMPLETE (_TypeT)
+    //                       || _RWSTD_IS_ARRAY (_TypeT)
+    //                       || _RWSTD_IS_VOID (_TypeT));
+};
+
+/**
+ * UnaryTypeTrait indicates that _TypeT has a nothrow assignment operator.
+ *
+ * _TypeT shall be a complete type, an array of unknown bound, or void
+ * (possibly cv-qualified).
+ */
+template <class _TypeT>
+struct __rw_has_nothrow_assign
+    : __rw_integral_constant<bool, _RWSTD_TT_HAS_NOTHROW_ASSIGN(_TypeT)>
+{
+    //_RWSTD_COMPILE_ASSERT (   _RWSTD_IS_COMPLETE (_TypeT)
+    //                       || _RWSTD_IS_ARRAY (_TypeT)
+    //                       || _RWSTD_IS_VOID (_TypeT));
+};
+
+/**
+ * UnaryTypeTrait indicates that _TypeT has a virtual destructor.
+ *
+ * _TypeT shall be a complete type, an array of unknown bound, or void
+ * (possibly cv-qualified).
+ */
+template <class _TypeT>
+struct __rw_has_virtual_dtor
+    : __rw_integral_constant<bool, _RWSTD_TT_HAS_VIRTUAL_DTOR(_TypeT)>
+{
+    //_RWSTD_COMPILE_ASSERT (   _RWSTD_IS_COMPLETE (_TypeT)
+    //                       || _RWSTD_IS_ARRAY (_TypeT)
+    //                       || _RWSTD_IS_VOID (_TypeT));
+};
+
+/**
+ * UnaryTypeTrait that indicates that _TypeT is an unsigned type.
+ */
+template <class _TypeT>
+struct __rw_is_unsigned
+    : __rw_integral_constant<bool, __rw_is_unsigned_impl<_TypeT>::_C_value>
+{
+};
+
+
+/**
+ * UnaryTypeTrait that indicates that _TypeT is a signed type.
+ */
+template <class _TypeT>
+struct __rw_is_signed
+    : __rw_integral_constant<bool, __rw_is_signed_impl<_TypeT>::_C_value>
+{
+};
+
+/**
+ * UnaryTypeTrait that gets the alignment of _TypeT.
+ */
+template <class _TypeT>
+struct __rw_alignment_of
+    : __rw_integral_constant<_RWSTD_SIZE_T, _RWSTD_TT_ALIGN_OF(_TypeT)>
+{
+    //_RWSTD_COMPILE_ASSERT (   _RWSTD_IS_COMPLETE (_TypeT)
+    //                       || _RWSTD_IS_ARRAY (_TypeT)
+    //                       || _RWSTD_IS_VOID (_TypeT));
+};
+
+/**
+ * UnaryTypeTrait gives the number of dimensions of the type _TypeT, if
+ * _TypeT is an array, otherwise 0. The primary template is for non-array
+ * types.
+ */
+template <class _TypeT>
+struct __rw_rank
+    : __rw_integral_constant<_RWSTD_SIZE_T, 0>
+{
+};
+
+/**
+ * UnaryTypeTrait gives the number of dimensions of the type _TypeT, if
+ * _TypeT is an array, otherwise 0. The primary template is for bounded
+ * -array types.
+ */
+template <class _TypeT, size_t _Size>
+struct __rw_rank<_TypeT [_Size]>
+    : __rw_integral_constant<_RWSTD_SIZE_T, 1 + __rw_rank<_TypeT>::value>
+{
+};
+
+/**
+ * UnaryTypeTrait gives the number of dimensions of the type _TypeT, if
+ * _TypeT is an array, otherwise 0. The primary template is for unbounded
+ * -array types.
+ */
+template <class _TypeT>
+struct __rw_rank<_TypeT []>
+    : __rw_integral_constant<_RWSTD_SIZE_T, 1 + __rw_rank<_TypeT>::value>
+{
+};
+
+
+/**
+ * UnaryTypeTrait gives the size of the _Depth dimension of _TypeT.
+ */
+template <class _TypeT, _RWSTD_SIZE_T _Depth>
+struct __rw_extent
+    : __rw_integral_constant<_RWSTD_SIZE_T, 0>
+{
+};
+
+template <class _TypeT, _RWSTD_SIZE_T _Size, _RWSTD_SIZE_T _Depth>
+struct __rw_extent<_TypeT [_Size], _Depth>
+    : __rw_integral_constant<_RWSTD_SIZE_T, __rw_extent<_TypeT, _Depth - 1>::value>
+{
+};
+
+template <class _TypeT, _RWSTD_SIZE_T _Depth>
+struct __rw_extent<_TypeT [], _Depth>
+    : __rw_integral_constant<_RWSTD_SIZE_T, __rw_extent<_TypeT, _Depth - 1>::value>
+{
+};
+
+template <class _TypeT, _RWSTD_SIZE_T _Size>
+struct __rw_extent<_TypeT [_Size], 0>
+    : __rw_integral_constant<_RWSTD_SIZE_T, _Size>
+{
+};
+
+template <class _TypeT>
+struct __rw_extent<_TypeT [], 0>
+    : __rw_integral_constant<_RWSTD_SIZE_T, 0>
+{
+};
+
+} // namespace __rw
+
+
+#endif   // _RWSTD_META_UNARY_PROP_H_INCLUDED

Propchange: stdcxx/branches/4.3.x/include/rw/_meta_prop.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: stdcxx/branches/4.3.x/include/rw/_meta_prop.h
------------------------------------------------------------------------------
    svn:keywords = Id

Added: stdcxx/branches/4.3.x/include/rw/_meta_ptr.h
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_meta_ptr.h?rev=667365&view=auto
==============================================================================
--- stdcxx/branches/4.3.x/include/rw/_meta_ptr.h (added)
+++ stdcxx/branches/4.3.x/include/rw/_meta_ptr.h Thu Jun 12 22:53:51 2008
@@ -0,0 +1,76 @@
+/***************************************************************************
+ *
+ * This is an internal header file used to implement the C++ Standard
+ * Library. It should never be #included directly by a program.
+ *
+ * $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 2008 Rogue Wave Software, Inc.
+ *
+ **************************************************************************/
+
+#ifndef _RWSTD_META_TRANS_PTR_H_INCLUDED
+#define _RWSTD_META_TRANS_PTR_H_INCLUDED
+
+#include <rw/_defs.h>
+#include <rw/_meta_ref.h>
+
+_RWSTD_NAMESPACE (__rw) {
+
+/**
+ * TransformationTrait strips a single level of pointer indirection from
+ * _TypeT. The primary template is for non-pointer types.
+ */
+template <class _TypeT>
+struct __rw_remove_pointer
+{
+    typedef _TypeT type;
+};
+
+/**
+ * TransformationTrait adds a single level of pointer indirection to
+ * _TypeT. This specialization is for pointer types.
+ */
+template <class _TypeT>
+struct __rw_remove_pointer<_TypeT*>
+{
+    typedef _TypeT type;
+};
+
+//#define _RWSTD_REMOVE_POINTER(T) typename _RW::__rw_remove_pointer<T>::type
+
+/**
+ * TransformationTrait adds a single level of pointer indirection to
+ * _TypeT.
+ */
+template <class _TypeT>
+struct __rw_add_pointer
+{
+    typedef typename
+    __rw_remove_reference<_TypeT>::type* type;
+};
+
+//#define _RWSTD_ADD_POINTER(T) typename _RW::__rw_add_pointer<T>::type
+
+} // namespace __rw
+
+
+#endif   // _RWSTD_META_TRANS_PTR_H_INCLUDED

Propchange: stdcxx/branches/4.3.x/include/rw/_meta_ptr.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: stdcxx/branches/4.3.x/include/rw/_meta_ptr.h
------------------------------------------------------------------------------
    svn:keywords = Id

Added: stdcxx/branches/4.3.x/include/rw/_meta_ref.h
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_meta_ref.h?rev=667365&view=auto
==============================================================================
--- stdcxx/branches/4.3.x/include/rw/_meta_ref.h (added)
+++ stdcxx/branches/4.3.x/include/rw/_meta_ref.h Thu Jun 12 22:53:51 2008
@@ -0,0 +1,147 @@
+/***************************************************************************
+ *
+ * This is an internal header file used to implement the C++ Standard
+ * Library. It should never be #included directly by a program.
+ *
+ * $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 2008 Rogue Wave Software, Inc.
+ *
+ **************************************************************************/
+
+#ifndef _RWSTD_META_TRANS_REF_H_INCLUDED
+#define _RWSTD_META_TRANS_REF_H_INCLUDED
+
+#include <rw/_defs.h>
+#include <rw/_meta_cat.h>
+
+_RWSTD_NAMESPACE (__rw) {
+
+/**
+ * TransformationTrait strips any top level reference specifier
+ * from _TypeT.
+ *
+ * The primary template is for non-reference types.
+ */
+template <class _TypeT>
+struct __rw_remove_reference
+{
+    typedef _TypeT type;
+};
+
+/**
+ * TransformationTrait strips any top level reference specifier
+ * from _TypeT.
+ *
+ * This specialization is for lvalue reference types.
+ */
+template <class _TypeT>
+struct __rw_remove_reference<_TypeT&>
+{
+    typedef _TypeT type;
+};
+
+#ifndef _RWSTD_NO_RVALUE_REFERENCES
+
+/**
+ * TransformationTrait strips any top level reference specifier
+ * from _TypeT.
+ *
+ * This specialization is for rval reference types.
+ */
+template <class _TypeT>
+struct __rw_remove_reference<_TypeT&&>
+{
+    typedef _TypeT type;
+};
+
+#endif   // _RWSTD_NO_RVALUE_REFERENCES
+
+template <class _TypeT, bool =    !__rw_is_void<_TypeT>::value
+                               && !__rw_is_reference<_TypeT>::value,
+                        bool = __rw_is_rvalue_reference<_TypeT>::value>
+struct __rw_add_lvalue_reference_impl
+{
+    // for other cases _C_type shall be _TypeT.
+    typedef _TypeT _C_type;
+};
+
+template <class _TypeT>
+struct __rw_add_lvalue_reference_impl<_TypeT, true, false>
+{
+    // for object and function types _C_type shall become _TypeT&
+    // for other cases _C_type shall be _TypeT.
+    typedef _TypeT& _C_type;
+};
+
+template <class _TypeT>
+struct __rw_add_lvalue_reference_impl<_TypeT, false, true>
+{
+    // for rval reference types, _C_type shall become the corresponding
+    // lvalue reference type
+    typedef _TYPENAME __rw_remove_reference<_TypeT>& _C_type;
+};
+
+/**
+ * TransformationTrait adds a lvalue reference to the input type _TypeT.
+ */
+template <class _TypeT>
+struct __rw_add_lvalue_reference
+{
+    typedef _TYPENAME
+    __rw_add_lvalue_reference_impl<_TypeT>::_C_type type;
+};
+
+
+template <class _TypeT, bool =    __rw_is_object<_TypeT>::value
+                               || __rw_is_function<_TypeT>::_C_type>
+struct __rw_add_rvalue_reference_impl
+{
+    // else it is _TypeT
+    typedef _TypeT _C_type;
+};
+
+#ifndef _RWSTD_NO_RVALUE_REFERENCES
+
+template <class _TypeT>
+struct __rw_add_rvalue_reference_impl<_TypeT, true>
+{
+    // for object and function types, _C_type is the same as _TypeT&&
+    typedef _TypeT&& _C_type;
+};
+
+#endif   // _RWSTD_NO_RVALUE_REFERENCES
+
+/**
+ * Trait makes a rval reference from the input type _TypeT.
+ */
+template <class _TypeT>
+struct __rw_add_rvalue_reference
+{
+    typedef _TYPENAME
+    __rw_add_rvalue_reference_impl<_TypeT>::_C_type type;
+};
+
+
+} // namespace __rw
+
+
+#endif   // _RWSTD_META_TRANS_REF_H_INCLUDED

Propchange: stdcxx/branches/4.3.x/include/rw/_meta_ref.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: stdcxx/branches/4.3.x/include/rw/_meta_ref.h
------------------------------------------------------------------------------
    svn:keywords = Id

Added: stdcxx/branches/4.3.x/include/rw/_meta_rel.h
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/include/rw/_meta_rel.h?rev=667365&view=auto
==============================================================================
--- stdcxx/branches/4.3.x/include/rw/_meta_rel.h (added)
+++ stdcxx/branches/4.3.x/include/rw/_meta_rel.h Thu Jun 12 22:53:51 2008
@@ -0,0 +1,203 @@
+/***************************************************************************
+ *
+ * This is an internal header file used to implement the C++ Standard
+ * Library. It should never be #included directly by a program.
+ *
+ * $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 2008 Rogue Wave Software, Inc.
+ *
+ **************************************************************************/
+
+#ifndef _RWSTD_META_REL_H_INCLUDED
+#define _RWSTD_META_REL_H_INCLUDED
+
+#include <rw/_defs.h>
+
+//#include <rw/_meta_ptr.h>
+//#include <rw/_meta_ref.h>
+//#include <rw/_meta_cat.h>
+//#include <rw/_meta_cv.h>
+
+_RWSTD_NAMESPACE (__rw) {
+
+/**
+ * UnaryTypeTrait indicates that the given types _TypeT and _TypeU are
+ * the same type, including cv-qualifiers.
+ *
+ * The primary template is for the case that _TypeT and _TypeU are indeed
+ * different types.
+ */
+template <class _TypeT, class _TypeU>
+struct __rw_is_same : __rw_false_type
+{
+};
+
+/**
+ * UnaryTypeTrait indicates that the given types _TypeT and _TypeU are
+ * the same type, including cv-qualifiers.
+ *
+ * This specialization is for the case that _TypeT and _TypeU are exactly
+ * the same types.
+ */
+template <class _TypeT>
+struct __rw_is_same<_TypeT, _TypeT> : __rw_true_type
+{
+};
+
+//#define _RWSTD_IS_SAME(T,U)                                           \
+//    __rw_is_same<T,U>::value
+
+/**
+ * BinaryTypeTrait indicates that _TypeT is a base class of _TypeU
+ * or _TypeT and _TypeU are not unions and name the same class type,
+ * without regard to cv-qualifiers.
+ *
+ * If _TypeT and _TypeU are class types and are different types, without
+ * regard to cv-qualifiers, then _TypeT shall be a complete type.
+ */
+template <class _TypeT, class _TypeU>
+struct __rw_is_base_of
+    : __rw_integral_constant<bool, _RWSTD_TT_IS_BASE_OF(_TypeT,_TypeU)>
+{
+    //_RWSTD_ASSERT (    _RWSTD_IS_CLASS (_TypeT)
+    //               &&  _RWSTD_IS_CLASS (_TypeU)
+    //               && !_RWSTD_IS_SAME(_TypeT, _TypeU)
+    //               ||
+};
+
+//#define _RWSTD_IS_BASE_OF(T,U)                                        \
+//    __rw_is_base_of<T,U>::value
+
+
+/**
+ * Primitive type trait tells us if we can create a _TypeU from a _TypeT.
+ */
+template <class _TypeT, class _TypeU>
+struct __rw_is_convertible_impl
+{
+    struct _C_no  { };
+    struct _C_yes { _C_no __pad [2]; };
+
+    static _C_yes _C_is (int, _TypeU);
+    static _C_no  _C_is (int, ...);
+
+    static _TypeT _C_make ();
+
+    enum { _C_value = sizeof (_C_yes) == sizeof (_C_is (0, _C_make ())) };
+};
+
+
+
+
+
+
+//template <class _TypeT, class _TypeU, bool = __rw_is_array<_TypeT>::value,
+//                                      bool = __rw_is_function<_TypeT>::value>
+//struct __rw_is_convertible_3
+//{
+//    // _TypeT is neither an array nor a function type, so just do a
+//    // straight conversion test
+//    enum { _C_value = __rw_is_convertible_impl<_TypeT, _TypeU>::_C_value };
+//};
+//
+//template <class _TypeT, class _TypeU>
+//struct __rw_is_convertible_3<_TypeT,_TypeU,true,false>
+//{
+//    // _TypeT is an array type, see if we can convert it to a _TypeU*
+//    typedef _TYPENAME __rw_remove_extent<_TypeT>::type _TypeV;
+//    typedef _TYPENAME __rw_add_pointer<_TypeV>::type _TypeT_Ptr;
+//
+//    enum { _C_value = __rw_is_convertible_impl<_TypeT_Ptr, _TypeU>::_C_value };
+//};
+//
+//template <class _TypeT, class _TypeU>
+//struct __rw_is_convertible_3<_TypeT,_TypeU,false,true>
+//{
+//    // _TypeT is an function type, try to convert to reference or pointer
+//    typedef _TYPENAME __rw_add_lvalue_reference<_TypeT>::type _TypeT_Ref;
+//    typedef _TYPENAME __rw_add_pointer<_TypeT>::type _TypeT_Ptr;
+//
+//    enum { _C_value =    __rw_is_convertible_impl<_TypeT_Ref, _TypeU>::_C_value
+//                      || __rw_is_convertible_impl<_TypeT_Ptr, _TypeU>::_C_value };
+//};
+//        
+//template <class _TypeT, class _TypeU, bool =   __rw_is_array<_TypeU>::value
+//                                             ||__rw_is_function<_TypeU>::value>
+//struct __rw_is_convertible_2
+//{
+//    // _TypeU is neither an array nor a function type
+//    enum { _C_value = __rw_is_convertible_3<_TypeT, _TypeU>::_C_value };
+//};
+//
+//template <class _TypeT, class _TypeU>
+//struct __rw_is_convertible_2<_TypeT, _TypeU, true>
+//{
+//    // _TypeU is either an array or a function type, and we can't convert to
+//    // either of those.
+//    enum { _C_value = 0 };
+//};
+//        
+//template <class _TypeT, class _TypeU, bool = __rw_is_void<_TypeT>::value,
+//                                      bool = __rw_is_void<_TypeU>::value>
+//struct __rw_is_convertible_1
+//{
+//    // void-to-non-void or non-void to void
+//    enum { _C_value = 0 };
+//};
+//
+//template <class _TypeT, class _TypeU>
+//struct __rw_is_convertible_1<_TypeT, _TypeU, false, false>
+//{
+//    // neither is _TypeT or _TypeU is (possibly cv-qualified) void
+//    enum { _C_value = __rw_is_convertible_2<_TypeT,_TypeU>::_C_value };
+//};
+//
+//template <class _TypeT, class _TypeU>
+//struct __rw_is_convertible_1<_TypeT, _TypeU, true, true>
+//{
+//    // both _TypeT and _TypeU are (possibly cv-qualified) void
+//    enum { _C_value = 1 };
+//};
+
+/**
+ * BinaryTypeTrait indicates that _TypeT is convertible to _TypeU
+ * using only implicit conversions.
+ *
+ * _TypeT shall be a complete type, an array of unknown bound, or void
+ * (possibly cv-qualified).
+ */
+template <class _TypeT, class _TypeU>
+struct __rw_is_convertible
+    : __rw_integral_constant<bool, _RWSTD_TT_IS_CONVERTIBLE(_TypeT,_TypeU)>
+{
+    //_RWSTD_COMPILE_ASSERT (   _RWSTD_IS_COMPLETE (_TypeT)
+    //                       || _RWSTD_IS_ARRAY (_TypeT)
+    //                       || _RWSTD_IS_VOID (_TypeT));
+};
+
+//#define _RWSTD_IS_CONVERTIBLE(T,U)                                    \
+//    __rw_is_convertible<T,U>::value
+
+} // namespace __rw
+
+
+#endif   // _RWSTD_META_REL_H_INCLUDED

Propchange: stdcxx/branches/4.3.x/include/rw/_meta_rel.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: stdcxx/branches/4.3.x/include/rw/_meta_rel.h
------------------------------------------------------------------------------
    svn:keywords = Id



Re: svn commit: r667365 [1/3] - in /stdcxx/branches/4.3.x: etc/config/src/ include/ include/rw/ tests/utilities/

Posted by Martin Sebor <se...@roguewave.com>.
Travis Vitek wrote:
>  
> 
> Martin Sebor wrote:
>> Travis Vitek wrote:
>>> Martin Sebor wrote:
>>>
>>>> Are you sure the traits are correct for char and wchar_t?
>>> No.
>>>
>>>> Also, do you believe the working draft to be
>>>> unambiguous and correct?
>>> No. For reference, I've pulled the requirements from the standard and
>>> pasted them below.
>>>
>>> There is at least one obvious ambiguity. Assume that char is signed.
>>> Should std::make_signed<unsigned char>::type be 'char' or 
>> 'signed char'?
>>
>> Yes. This needs to be clarified. Could you bring it up on
>> c++std-lib@accu.org to make sure it's not a known problem
>> that's already being handled? I'll help you write up the
>> issue if it isn't.
> 
> Okay. How formal is this list? Can I just post a quick message showing a
> testcase and asking if the issue is known, or should I go through the
> trouble to pull all of the necessary quotes from the draft, proposal and
> papers?

You don't need to quote the spec like you did here. A small
test case is always nice, although in this case, I'm not sure
it's necessary. All we need to know, I think, is whether
make_signed<T>::type is intended to be signed char or plain
char if T is char and CHAR_MIN < 0, and what the intended
effects are for T being wchar_t. And maybe also for T being
an enumeration.

> 
>>> Same goes for std::make_signed<enum_t>::type when sizeof(enum_t) ==
>>> sizeof(char). If both 'char' and 'signed char' are signed integral
>>> types, which of the two should be used?
>> I didn't think enums could be smaller than int but that's
>> probably going to change with scoped enums.
> 
> If I'm reading the standard correctly, specifically decl.enum p4 and 5,
> it seems that it is allowed.
> 
>>> It also seems wrong to have std::make_signed<char>::type be 'signed
>>> char' only when 'char' is unsigned. It seems that users 
>> would like to be
>>> able to expect that the resulting type be consistent 
>> regardless of the
>>> signed-ness of char.
>> Sounds like a valid point to me. OTOH, the actual type may
>> not matter all that much just as long as the signedness is
>> right. In my experience, in the handful of cases when I've
>> ever needed an unsigned form of a (possibly) signed type
>> all I cared about was the absence of signedness.
>>
> 
> Sure, but it would be nice if there was a requirement.

Absolutely!

Martin

RE: svn commit: r667365 [1/3] - in /stdcxx/branches/4.3.x: etc/config/src/ include/ include/rw/ tests/utilities/

Posted by Travis Vitek <Tr...@roguewave.com>.
 

Martin Sebor wrote:
>
>Travis Vitek wrote:
>> 
>> Martin Sebor wrote:
>> 
>>> Are you sure the traits are correct for char and wchar_t?
>> 
>> No.
>> 
>>> Also, do you believe the working draft to be
>>> unambiguous and correct?
>> 
>> No. For reference, I've pulled the requirements from the standard and
>> pasted them below.
>> 
>> There is at least one obvious ambiguity. Assume that char is signed.
>> Should std::make_signed<unsigned char>::type be 'char' or 
>'signed char'?
>
>Yes. This needs to be clarified. Could you bring it up on
>c++std-lib@accu.org to make sure it's not a known problem
>that's already being handled? I'll help you write up the
>issue if it isn't.

Okay. How formal is this list? Can I just post a quick message showing a
testcase and asking if the issue is known, or should I go through the
trouble to pull all of the necessary quotes from the draft, proposal and
papers?

>
>> Same goes for std::make_signed<enum_t>::type when sizeof(enum_t) ==
>> sizeof(char). If both 'char' and 'signed char' are signed integral
>> types, which of the two should be used?
>
>I didn't think enums could be smaller than int but that's
>probably going to change with scoped enums.

If I'm reading the standard correctly, specifically decl.enum p4 and 5,
it seems that it is allowed.

>> 
>> It also seems wrong to have std::make_signed<char>::type be 'signed
>> char' only when 'char' is unsigned. It seems that users 
>would like to be
>> able to expect that the resulting type be consistent 
>regardless of the
>> signed-ness of char.
>
>Sounds like a valid point to me. OTOH, the actual type may
>not matter all that much just as long as the signedness is
>right. In my experience, in the handful of cases when I've
>ever needed an unsigned form of a (possibly) signed type
>all I cared about was the absence of signedness.
>

Sure, but it would be nice if there was a requirement.

>> 
>> Both of these issues make me think that the definition of make_signed
>> should have said 'signed integer type' instead of 'signed integral
>> type'.
>
>You mean just signed/unsigned integers (I had to look up the
>difference). I suspect most people would find a make_signed
>that didn't work with char to be broken.

Yeah, my proposed change wouldn't be sufficient. It would need to say
something about using explicit signed/unsigned qualifications for char.

>
>> 
>>> Based on my reading, make_signed<T>
>>> ::type should be the same as T if T is a signed integral type.
>>> IIUC, our make_signed<char>::type is defined to signed char
>>> regardless of the signed-ness of char. Ditto for wchar_t.
>
>Right. That's what caught my attention because it goes
>against the requirement.
>
>Martin
>
>>>

Re: svn commit: r667365 [1/3] - in /stdcxx/branches/4.3.x: etc/config/src/ include/ include/rw/ tests/utilities/

Posted by Martin Sebor <se...@roguewave.com>.
Travis Vitek wrote:
>  
> 
> Martin Sebor wrote:
> 
>> Are you sure the traits are correct for char and wchar_t?
> 
> No.
> 
>> Also, do you believe the working draft to be
>> unambiguous and correct?
> 
> No. For reference, I've pulled the requirements from the standard and
> pasted them below.
> 
> There is at least one obvious ambiguity. Assume that char is signed.
> Should std::make_signed<unsigned char>::type be 'char' or 'signed char'?

Yes. This needs to be clarified. Could you bring it up on
c++std-lib@accu.org to make sure it's not a known problem
that's already being handled? I'll help you write up the
issue if it isn't.

> Same goes for std::make_signed<enum_t>::type when sizeof(enum_t) ==
> sizeof(char). If both 'char' and 'signed char' are signed integral
> types, which of the two should be used?

I didn't think enums could be smaller than int but that's
probably going to change with scoped enums.

> 
> It also seems wrong to have std::make_signed<char>::type be 'signed
> char' only when 'char' is unsigned. It seems that users would like to be
> able to expect that the resulting type be consistent regardless of the
> signed-ness of char.

Sounds like a valid point to me. OTOH, the actual type may
not matter all that much just as long as the signedness is
right. In my experience, in the handful of cases when I've
ever needed an unsigned form of a (possibly) signed type
all I cared about was the absence of signedness.

> 
> Both of these issues make me think that the definition of make_signed
> should have said 'signed integer type' instead of 'signed integral
> type'.

You mean just signed/unsigned integers (I had to look up the
difference). I suspect most people would find a make_signed
that didn't work with char to be broken.

> 
>> Based on my reading, make_signed<T>
>> ::type should be the same as T if T is a signed integral type.
>> IIUC, our make_signed<char>::type is defined to signed char
>> regardless of the signed-ness of char. Ditto for wchar_t.

Right. That's what caught my attention because it goes
against the requirement.

Martin

>>
> 
> [basic.fundamental] p2
> 
>   There are five standard signed integer types: "signed char",
>   "short int", "int", "long int", and "long long int". In this
>   list, each type provides at least as much storage as those
>   preceding it in the list. [...] The standard and extended
>   signed integer types are collectively called signed integer
>   types.
> 
> [basic.fundamental] p3
> 
>   For each of the standard signed integer types, there exists
>   a corresponding standard unsigned integer type: "unsigned
>   char", "unsigned short int", "unsigned int", "unsigned long
>   int", and "unsigned long long int", each of which occupies
>   the same amount of storage and has the same alignment
>   requirements as the corresponding signed integer type. [...]
>   The standard and extended unsigned integer types are
>   collectively called unsigned integer types.
> 
> [basic.fundamental] p7
> 
>   Types bool, char, char16_t, char32_t, wchar_t, and the signed
>   and unsigned integer types are collectively called integral
>   types.
> 
> [meta.trans.sign]
> 
>   If T names a (possibly cv-qualified) signed integral type then
>   the member typedef type shall name the type T; otherwise, if T
>   names a (possibly cv-qualified) unsigned integral type then type
>   shall name the corresponding signed integral type, with the same
>   cv-qualifiers as T; otherwise, type shall name the signed
>   integral type with smallest rank for which sizeof(T) ==
>   sizeof(type), with the same cv-qualifiers as T.
> 
> 


RE: svn commit: r667365 [1/3] - in /stdcxx/branches/4.3.x: etc/config/src/ include/ include/rw/ tests/utilities/

Posted by Travis Vitek <Tr...@roguewave.com>.
 

Martin Sebor wrote:

>Are you sure the traits are correct for char and wchar_t?

No.

>Also, do you believe the working draft to be
>unambiguous and correct?

No. For reference, I've pulled the requirements from the standard and
pasted them below.

There is at least one obvious ambiguity. Assume that char is signed.
Should std::make_signed<unsigned char>::type be 'char' or 'signed char'?
Same goes for std::make_signed<enum_t>::type when sizeof(enum_t) ==
sizeof(char). If both 'char' and 'signed char' are signed integral
types, which of the two should be used?

It also seems wrong to have std::make_signed<char>::type be 'signed
char' only when 'char' is unsigned. It seems that users would like to be
able to expect that the resulting type be consistent regardless of the
signed-ness of char.

Both of these issues make me think that the definition of make_signed
should have said 'signed integer type' instead of 'signed integral
type'.

>Based on my reading, make_signed<T>
>::type should be the same as T if T is a signed integral type.
>IIUC, our make_signed<char>::type is defined to signed char
>regardless of the signed-ness of char. Ditto for wchar_t.
>

[basic.fundamental] p2

  There are five standard signed integer types: "signed char",
  "short int", "int", "long int", and "long long int". In this
  list, each type provides at least as much storage as those
  preceding it in the list. [...] The standard and extended
  signed integer types are collectively called signed integer
  types.

[basic.fundamental] p3

  For each of the standard signed integer types, there exists
  a corresponding standard unsigned integer type: "unsigned
  char", "unsigned short int", "unsigned int", "unsigned long
  int", and "unsigned long long int", each of which occupies
  the same amount of storage and has the same alignment
  requirements as the corresponding signed integer type. [...]
  The standard and extended unsigned integer types are
  collectively called unsigned integer types.

[basic.fundamental] p7

  Types bool, char, char16_t, char32_t, wchar_t, and the signed
  and unsigned integer types are collectively called integral
  types.

[meta.trans.sign]

  If T names a (possibly cv-qualified) signed integral type then
  the member typedef type shall name the type T; otherwise, if T
  names a (possibly cv-qualified) unsigned integral type then type
  shall name the corresponding signed integral type, with the same
  cv-qualifiers as T; otherwise, type shall name the signed
  integral type with smallest rank for which sizeof(T) ==
  sizeof(type), with the same cv-qualifiers as T.



RE: svn commit: r667365 [1/3] - in /stdcxx/branches/4.3.x: etc/config/src/ include/ include/rw/ tests/utilities/

Posted by Travis Vitek <Tr...@roguewave.com>.
 

Martin Sebor wrote:
>
>vitek@apache.org wrote:
>> Author: vitek
>> Date: Thu Jun 12 22:53:51 2008
>> New Revision: 667365
>
>I understand that this is work in progress so just to help
>make progress here are a few comments on some small issues
>with this change:
>
>Some files are missing the required terminating newline (they
>are noted in the svn change notification).

Fixed in http://svn.apache.org/viewvc?rev=668208&view=rev.

>Also, some of the #include guards are inconsistent with the
>names of the headers they guard after their renaming. The
>guards need to be reviewed and bring into harmony with the
>names (we night want to write a simple shell script to help
>with this process).

Fixed in http://svn.apache.org/viewvc?rev=668223&view=rev.

>
>Finally, I'm not sure the patch is consistent WRT the use
>of the type and value (vs. _C_type and _C_value) typedefs.
>I hope we can agree on using of the public names throughout.

I opted to use the prefix for helpers that should never be anywhere
except in the implementation of the actual trait. For example,
__rw_add_lvalue_reference_impl<> uses '_C_type' and
__rw_add_lvalue_reference<> uses 'type'.

>
>> 
>> URL: http://svn.apache.org/viewvc?rev=667365&view=rev
>> Log:
>> 2008-06-12  Travis Vitek  <vi...@roguewave.com>
>> 
>> 	STDCXX-916
>> 	* include/type_traits: New file defines C++0x type traits.
>> 	* include/rw/_config-gcc.h: Add macros for compiler support.
>
>The macro names should be listed here so we can find them in
>ChangeLogs.

Log updated.

>I was also hoping we were in agreement on removing
>the _TT_ part from the macro names.

I do recall that you suggested this, but I don't recall agreeing to
this.

One disadvantage of removing them is that the macros are defined in one
file if the trait has compiler support or in another file if it doesn't.
i.e. _RWSTD_IS_ENUM() is defined if you #include rw/_defs.h if compiler
support is available, but it would be defined in rw/_meta_cat.h if it is
not. This could lead to failures because the 'user' forgot to include
the correct header and tested on platforms that had compiler support.

>
>> 	* include/rw/_config-msvc.h: Ditto.
>> 	* include/rw/_config.h [_RWSTD_EXT_CXX_OX]: Disable C++0x
>> 	extensions unless defined.
>> 	* include/rw/_defs.h [_RWSTD_SWCHAR_INT_T]: Add new macro that
>> 	defines a type that has same size and layout a the fictional
>> 	signed wchar_t.
>
>What do we need _RWSTD_SWCHAR_INT_T for?
>
>[...searching...]
>
>I see: for make_signed. Are you sure the traits are correct for
>char and wchar_t? Also, do you believe the working draft to be
>unambiguous and correct? Based on my reading, make_signed<T>
>::type should be the same as T if T is a signed integral type.
>IIUC, our make_signed<char>::type is defined to signed char
>regardless of the signed-ness of char. Ditto for wchar_t.
>
>Also, I assume the big block of #ifdef'ed out code with the
>_RWSTD_TT_XXX() macro definitions was meant to be deleted?
>
>Finally, the (unsafe) change to _RWSTD_UWCHAR_INT_T isn't
>mentioned here.

I'll update the log but I'm unsure exactly why this change is unsafe.

>It should be reverted (and _RWSTD_SWCHAR_INT_T
>should be changed to something like _RWSTD_PTRDIFF_T or maybe
>_RWSTD_SSIZE_T.

I don't understand why this is any better. It would seem that if there
are a finite number of [un]signed integral types and we want a
[un]signed integral type that is the same size as 'wchar_t' we would
just look at the [un]signed integral types. There should be no need to
even consider anything else.

If anything I should have added a #error case if _RWSTD_WCHAR_SIZE is
not equal to the size of at least one of the integral types.

>
>Martin
>

Re: svn commit: r667365 [1/3] - in /stdcxx/branches/4.3.x: etc/config/src/ include/ include/rw/ tests/utilities/

Posted by Martin Sebor <se...@roguewave.com>.
vitek@apache.org wrote:
> Author: vitek
> Date: Thu Jun 12 22:53:51 2008
> New Revision: 667365

I understand that this is work in progress so just to help
make progress here are a few comments on some small issues
with this change:

Some files are missing the required terminating newline (they
are noted in the svn change notification).

Also, some of the #include guards are inconsistent with the
names of the headers they guard after their renaming. The
guards need to be reviewed and bring into harmony with the
names (we night want to write a simple shell script to help
with this process).

Finally, I'm not sure the patch is consistent WRT the use
of the type and value (vs. _C_type and _C_value) typedefs.
I hope we can agree on using of the public names throughout.

> 
> URL: http://svn.apache.org/viewvc?rev=667365&view=rev
> Log:
> 2008-06-12  Travis Vitek  <vi...@roguewave.com>
> 
> 	STDCXX-916
> 	* include/type_traits: New file defines C++0x type traits.
> 	* include/rw/_config-gcc.h: Add macros for compiler support.

The macro names should be listed here so we can find them in
ChangeLogs. I was also hoping we were in agreement on removing
the _TT_ part from the macro names.

> 	* include/rw/_config-msvc.h: Ditto.
> 	* include/rw/_config.h [_RWSTD_EXT_CXX_OX]: Disable C++0x
> 	extensions unless defined.
> 	* include/rw/_defs.h [_RWSTD_SWCHAR_INT_T]: Add new macro that
> 	defines a type that has same size and layout a the fictional
> 	signed wchar_t.

What do we need _RWSTD_SWCHAR_INT_T for?

[...searching...]

I see: for make_signed. Are you sure the traits are correct for
char and wchar_t? Also, do you believe the working draft to be
unambiguous and correct? Based on my reading, make_signed<T>
::type should be the same as T if T is a signed integral type.
IIUC, our make_signed<char>::type is defined to signed char
regardless of the signed-ness of char. Ditto for wchar_t.

Also, I assume the big block of #ifdef'ed out code with the
_RWSTD_TT_XXX() macro definitions was meant to be deleted?

Finally, the (unsafe) change to _RWSTD_UWCHAR_INT_T isn't
mentioned here. It should be reverted (and _RWSTD_SWCHAR_INT_T
should be changed to something like _RWSTD_PTRDIFF_T or maybe
_RWSTD_SSIZE_T.

Martin