2008-08-01  Travis Vitek  <vitek@roguewave.com>

	Merge r671285, r671294, r671306, r671612, r671972, r672048, r672395,
	r672596, r672948, r673227, r673490, r673495, r673534, r673851, r673865,
	r675044, r675316, r675344, r675390, r675429, r675434, r675458, r675803,
	r675809, r675829, r676788, r677418, r677464, r677465, r677985, r678247,
	r678475, r678894, r678901, r678907, r678913, r678931, r680574, r681567
	from branches/4.3.x:


	2008-06-24  Travis Vitek  <vitek@roguewave.com>

	STDCXX-916
	* include/rw/_meta_arr.h (_RWSTD_REMOVE_EXTENT)
	(_RWSTD_REMOVE_ALL_EXTENTS): Add macros for type traits.
	* include/rw/_meta_cat.h (_RWSTD_IS_VOID, _RWSTD_IS_INTEGRAL)
	(_RWSTD_IS_FLOATING_POINT, _RWSTD_IS_ARRAY, _RWSTD_IS_UNION)
	(_RWSTD_IS_LVALUE_REFERENCE, _RWSTD_IS_RVALUE_REFERENCE)
	(_RWSTD_IS_CLASS, _RWSTD_IS_FUNCTION, _RWSTD_IS_MEMBER_OBJECT_PTR)
	(_RWSTD_IS_MEMBER_OBJECT_PTR): Ditto.
	* include/rw/_meta_comp.h (_RWSTD_IS_REFERENCE, _RWSTD_IS_OBJECT)
	(_RWSTD_IS_ARITHMETIC, _RWSTD_IS_FUNDAMENTAL, _RWSTD_IS_SCALAR)
	(_RWSTD_IS_MEMBER_POINTER, _RWSTD_IS_COMPOUND): Ditto.
	* include/rw/_meta_cv.h (_RWSTD_REMOVE_CONST, _RWSTD_REMOVE_CV)
	(_RWSTD_REMOVE_VOLATILE, _RWSTD_ADD_CONST, _RWSTD_ADD_VOLATILE)
	(_RWSTD_ADD_CV): Ditto.
	* include/rw/_meta_prop.h (_RWSTD_IS_CONST, _RWSTD_IS_VOLATILE)
	(_RWSTD_IS_STANDARD_LAYOUT, _RWSTD_IS_POD, _RWSTD_IS_ABSTRACT)
	(_RWSTD_IS_POLYMORPHIC, _RWSTD_IS_EMPTY, _RWSTD_HAS_TRIVIAL_CTOR)
	(_RWSTD_HAS_TRIVIAL_COPY, _RWSTD_HAS_TRIVIAL_ASSIGN)
	(_RWSTD_HAS_TRIVIAL_DTOR, _RWSTD_IS_TRIVIAL, _RWSTD_RANK)
	(_RWSTD_HAS_NOTHROW_CTOR, _RWSTD_HAS_NOTHROW_COPY)
	(_RWSTD_HAS_NOTHROW_ASSIGN, _RWSTD_HAS_VIRTUAL_DTOR)
	(_RWSTD_IS_SIGNED, _RWSTD_IS_UNSIGNED, _RWSTD_EXTENT_1)
	(_RWSTD_EXTENT_2): Ditto.
	* include/rw/_meta_ptr.h (_RWSTD_REMOVE_POINTER)
	(_RWSTD_ADD_POINTER): Ditto.
	* include/rw/_meta_ref.h (_RWSTD_ADD_RVALUE_REFERENCE)
	(_RWSTD_ADD_LVALUE_REFERENCE, _RWSTD_REMOVE_REFERENCE): Ditto.
	* include/rw/_meta_rel.h (_RWSTD_IS_SAME, _RWSTD_IS_BASE_OF)
	(_RWSTD_IS_CONVERTIBLE): Ditto.
	* include/rw/_meta_sign.h (_RWSTD_MAKE_SIGNED)
	(_RWSTD_MAKE_UNSIGNED): Ditto.


	2008-06-24  Travis Vitek  <vitek@roguewave.com>

	STDCXX-916
	* include/type_traits: Remove doxygen comments, leaving C++
	comments where appropriate.
	* include/rw/_meta_arr.h: Ditto.
	* include/rw/_meta_cat.h: Ditto.
	* include/rw/_meta_comp.h: Ditto.
	* include/rw/_meta_cv.h: Ditto.
	* include/rw/_meta_other.h: Ditto.
	* include/rw/_meta_prop.h: Ditto.
	* include/rw/_meta_ptr.h: Ditto.
	* include/rw/_meta_ref.h: Ditto.
	* include/rw/_meta_rel.h: Ditto.
	* include/rw/_meta_sign.h: Ditto.
	(_RWSTD_SHRT_SIZE): Fix spelling error.


	2008-06-24  Eric Lemings <eric.lemings@roguewave.com>

	STDCXX-958
	* include/tuple: Removed comments containing public API
	documentation in the interests implementing C++0x features as
	quickly as possible by saving time writing further documentation
	and dealing with documentation-related issues in the foreseeable
	future.
	* include/rw/_tuple.h: Likewise.
	* include/rw/_tuple_traits.h: Likewise.
	* include/rw/_forward.h: Likewise.
	* include/rw/_ref_wrap.h: Likewise.
	* doc/Doxyfile: Not needed for now.


	2008-06-25  Eric Lemings <eric.lemings@roguewave.com>

	STDCXX-958
	* include/rw/_meta_help.h (_RWSTD_BOOL_CONST): Add convenience
	macro for boolean constants.


	2008-06-26  Eric Lemings <eric.lemings@roguewave.com>

	STDCXX-958
	* tests/intro/17.names.cpp: C++0x `reference_wrapper' class
	template requires `type' member so replace `type' name with
	`!ERROR!' only when not building with C++0x extensions.


	2008-06-27  Travis Vitek  <vitek@roguewave.com>

	* tests/utilities/20.forward.cpp [_RWSTD_NO_EXT_CXX_0X]: Add
	guard to get test to compile and run when extension is not
	explicitly enabled. Include rw/_defs.h explicitly before using
	configuration macro to follow include policy.
	* tests/utilities/20.tuple.cnstr.cpp: Ditto.
	* tests/utilities/20.tuple.elem.cpp: Ditto.
	* tests/utilities/20.tuple.helpers.cpp: Ditto.
	* tests/utilities/20.meta.help.cpp: include rw/_defs.h explicitly
	in case rw_driver.h does not.
	* tests/utilities/20.meta.rel.cpp: Ditto.
	* tests/utilities/20.meta.trans.arr.cpp: Ditto.
	* tests/utilities/20.meta.trans.cv.cpp: Ditto.
	* tests/utilities/20.meta.trans.ptr.cpp: Ditto.
	* tests/utilities/20.meta.trans.ref.cpp: Ditto.
	* tests/utilities/20.meta.unary.comp.cpp: Ditto.
	* tests/utilities/20.meta.trans.other.cpp: Ditto. Move includes
	inside _RWSTD_NO_EXT_CXX_0X block.
	* tests/utilities/20.meta.trans.sign.cpp: Ditto.
	* tests/utilities/20.meta.unary.cat.cpp: Ditto.
	* tests/utilities/20.meta.unary.prop.cpp: Ditto.


	2008-06-27  Eric Lemings <eric.lemings@roguewave.com>

	STDCXX-958
	* include/rw/_ref_wrap.h: Convert internal namespace members to
	standard namespace members (at least until such a time when
	internal namespace members are actually needed).
	(reference_wrapper): Implemented basic constructors, operators,
	and accessors.  (No specializations, function inheritance,
	result_of, or invocation operators yet.)
	(ref, cref): Also implemented.
	* include/functional: Include <rw/_ref_wrap.h> header.
	(Internal header contains C++0x guards so it only gets compiled
	for C++0X code.)


	2008-06-28  Martin Sebor  <sebor@roguewave.com>

	* tests/utilities/20.meta.unary.prop.cpp (cfun_t, incomplete_t): New
	types used for testing.
	(test_is_const, test_is_volatile): Exercised incomplete_t, arrays
	with unknown bounds, functions with C++ and C language linkage,
	and pointers to member functions.
	(test_is_trivial): Exercised void.


	2008-06-30  Eric Lemings <eric.lemings@roguewave.com>

	STDCXX-958
	* include/rw/_forward.h: Add additional macro functions for
	consistency.  Use consistent comment format for standard section
	references.  Utilize type trait macro.  Other minor changes in
	copyright notice.
	* include/rw/_ref_wrap.h: Add standard section reference comment.
	Remove explicit template parameter names within class template.
	Add _RWSTD_ASSERT() statements where appropriate.  Replaced
	template parameter name with public typedef name inside class
	template.
	* include/rw/_tuple_traits.h: Removed.  Incorporated directly
	into <tuple> header.
	* include/rw/_tuple.h: Added internal tuple class template and
	make_tuple helpers.  Utilize _RWSTD_FORWARD() function macro.
	* include/tuple: Minor changes in header comment.  Moved internal
	members to <rw/_tuple.h> header.  Include <rw/_forward.h> and
	utilize _RWSTD_FORWARD() and _RWSTD_MOVE macro functions.
	Inherit class template `std::tuple' from internal `__rw_tuple'
	class template.  Reworked pair specialization to also inherit
	from internal tuple.  Add `_BaseU' macro definition for use in
	_RWSTD_STATIC_CAST where type contains commas (which won't work
	in static_cast when expanded).
	(tuple_element): Updated get helpers in std::tuple_element class
	template with internal type trait macros.  
	(get): Fixed.
	(make_tuple(), operator==, operator<): Implemented.
	* tests/utilities/20.tuple.cnstr.cpp: Updated previously broken
	tests.
	* tests/utilities/20.tuple.helpers.cpp: Minor changes (copyright
	notice).
	* tests/utilities/20.tuple.h: Same.
	* tests/utilities/20.tuple.creation.cpp: Added new test program
	for tuple creation helpers.
	* tests/utilities/20.tuple.rel.cpp: Added (outline of) new test
	program
	* tests/utilities/20.tuple.elem.cpp: Added more const/mutable
	tests.



	2008-07-01  Eric Lemings <eric.lemings@roguewave.com>

	STDCXX-958
	* include/tuple: Uncomment ctors that were temporarily commented
	out (and accidently checked in) due to forward/move semantics
	problem in make_tuple() with reference wrappers.
	* include/rw/_forward.h: Remove unnecessary _EXPORT macro.
	Define functions as inline.  Change `std' namespace to `_STD' in
	definition of _RWSTD_MOVE function macro.
	* include/rw/_tuple.h: Fix forward/move semantics for homogenous
	move ctor.
	* tests/utilities/20.tuple.h: Add tuple with reference type.
	* tests/utilities/20.tuple.cnstr.cpp: Added tests for tuples
	with reference types.  Added more tests for value move ctors.
	* tests/utilities/20.tuple.creation.cpp: Added two small tests
	for make_tuple() with reference wrappers.


	2008-07-02  Eric Lemings <eric.lemings@roguewave.com>

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

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


	2008-07-02  Eric Lemings <eric.lemings@roguewave.com>

	STDCXX-948
	* include/functional:  Oops.  Used wrong name for C++0x macro
	guard.  Fixed.
	* include/utility: Likewise.


	2008-07-02  Eric Lemings <eric.lemings@roguewave.com>

	STDCXX-958
	* include/tuple: Use `_TypeT' and `_TypesT' template parameter
	names.  Add comment clarifying necessary static casts.  Use
	_RWSTD_SIZE_T type for index of tuple elements per LWG issue
	#755.
	* include/rw/_forward.h: More template parameter renaming.
	* include/rw/_ref_wrap.h: Likewise.
	* include/rw/_tuple.h: Likewise.

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


	2008-07-03  Travis Vitek  <vitek@roguewave.com>

	* include/functional [_RWSTD_NO_EXT_CXX_0X]: Move <rw/_ref_wrap.h>
	include into conditional block to avoid problems compiling test
	17.names.cpp


	2008-07-03  Travis Vitek  <vitek@roguewave.com>

	* tests/utilities/20.tuple.cnstr.cpp [_RWSTD_NO_RVALUE_REFERENCES]:
	Disable body of test if _RWSTD_NO_EXT_CXX_0X is not defined but tuples
	are unavailable due to insufficient compiler support.
	(run_test) [_RWSTD_NO_RVALUE_REFERENCES, _RWSTD_NO_EXT_CXX_0X]: Display
	descriptive warning explaining why test is disabled.
	* tests/utilities/20.tuple.helpers.cpp: Ditto.
	* tests/utilities/20.tuple.creation.cpp: Ditto.
	* tests/utilities/20.tuple.elem.cpp: Ditto.
	* tests/utilities/20.tuple.rel.cpp: Ditto.
	* tests/utilities/20.forward.cpp (run_test): Run test_identity() even
	when rvalue references are not supported. Display descriptive warning
	explaining why parts of test are disabled.


	2008-07-08  Eric Lemings <eric.lemings@roguewave.com>

	STDCXX-958
	* include/tuple: Second parameter in value move ctor of pair
	specialization missing rvalue reference.
	(make_tuple, get, relational operators): Explicitly declare
	as inline functions.
	(tie): Implemented.
	* include/rw/_tuple.h: Fix move semantics in heterogenous move
	assignment operator.
	(__rw_ignore): Add assignment operator to ignore all values.
	* tests/utilities/20.tuple.cnstr.cpp: Added V&V for tuple
	state and invariants.  Manually inspected proper construction
	of all test tuples.  Updated/corrected/added tests as necessary.
	* tests/utilities/20.tuple.creation.cpp: Added simple tie()
	test.
	* tests/utilities/20.tuple.h: Minor stylistic changes.
	* tests/utilities/20.tuple.helpers.cpp: Same.


	2008-07-09  Eric Lemings <eric.lemings@roguewave.com>

	STDCXX-958
	* tests/utilities/20.tuple.cnstr.cpp (verify_tuple): Fixed
	assertions from float/double conversions.
	* tests/tr1.util, tests/tr1.c99: Removed unused directories.


	2008-07-09  Eric Lemings <eric.lemings@roguewave.com>

	STDCXX-958
	* include/rw/_tuple.h (__rw_ignore::operator=): Simplify
	defininition of operator.


	2008-07-09  Martin Sebor  <sebor@roguewave.com>

	* include/rw/_select.h (__rw_same_type): Renamed from __rw_is_same
	to avoid conflicts with <rw/_meta_rel.h>.
	* include/rw/_ioinsert.h (__rw_insert): Used __rw_same_type rather
	than __rw_is_same.


	2008-07-09  Martin Sebor  <sebor@roguewave.com>

	* include/queue (typename): Replaced uses of the _TYPENAME macro
	with the now universally supported C++ keyword.
	* include/fstream: Same.
	* include/set: Same.
	* include/list: Same.
	* include/bitset.cc: Same.
	* include/string: Same.
	* include/streambuf.cc: Same.
	* include/ostream.cc: Same.
	* include/map: Same.
	* include/valarray: Same.
	* include/streambuf: Same.
	* include/loc/_money_put.cc: Same.
	* include/loc/_messages.cc: Same.
	* include/loc/_num_put.cc: Same.
	* include/loc/_ctype.cc: Same.
	* include/loc/_numpunct.h: Same.
	* include/loc/_time_get.cc: Same.
	* include/loc/_money_get.cc: Same.
	* include/loc/_num_get.cc: Same.
	* include/loc/_time_put.cc: Same.
	* include/algorithm.cc: Same.
	* include/ostream: Same.
	* include/functional: Same.
	* include/vector.cc: Same.
	* include/type_traits: Same.
	* include/fstream.cc: Same.
	* include/istream.cc: Same.
	* include/deque.cc: Same.
	* include/stack: Same.
	* include/string.cc: Same.
	* include/list.cc: Same.
	* include/istream: Same.
	* include/vector: Same.
	* include/deque: Same.
	* include/bitset: Same.
	* include/algorithm: Same.
	* include/sstream: Same.
	* include/array: Same.
	* include/rw/_defs.h: Same.
	* include/rw/_tree.cc: Same.
	* include/rw/_iterbase.h: Same.
	* include/rw/_select.h: Same.
	* include/rw/_tuple.h: Same.
	* include/rw/_iterator.h: Same.
	* include/rw/_basic_ios.h: Same.
	* include/rw/_specialized.h: Same.
	* include/rw/_ioinsert.cc: Same.
	* include/rw/_tree.h: Same.
	* include/rw/_stringio.cc: Same.
	* include/rw/_strref.h: Same.
	* include/rw/_streamiter.h: Same.
	* include/rw/_forward.h: Same.
	* include/rw/_autoptr.h: Same.
	* include/rw/_smartptr.h: Same.
	* include/rw/_funcbase.h: Same.
	* include/rw/_typetraits.h: Same.
	* include/rw/_allocator.h: Same.
	* include/rw/_ioiter.h: Same.
	* include/rw/_algobase.h: Same.
	* include/sstream.cc: Same.
	* include/tuple: Same.
	* src/collate.cpp: Same.
	* examples/include/examples.h: Same.
	* tests/containers/23.bitset.cpp: Same.
	* tests/utilities/20.meta.help.cpp: Same.
	* tests/utilities/20.auto.ptr.cpp: Same.
	* tests/utilities/20.meta.trans.other.cpp: Same.
	* tests/include/rw_testdefs.h: Same.

	* include/rw/_defs.h (_TYPENAME): Removed macro #definition.
	* include/vector [!_RWSTD_NO_TYPENAME] (typename): Removed macro
	#definition.
	* examples/include/examples.h: Same.
	* tests/include/rw_testdefs.h: Same.
	* etc/config/src/DEPENDENT_TEMPLATE.cpp: Same.
	* etc/config/src/NONDEDUCED_CONTEXT.cpp: Same.
	* etc/config/src/STATIC_CONST_MEMBER_EXPR_CONST.cpp: Same.
	* etc/config/src/TYPENAME.cpp: Deleted.
	* README (_TYPENAME): Same.


	2008-07-09  Martin Sebor  <sebor@roguewave.com>

	* include/tuple (explicit): Replaced uses of the _EXPLICIT macro
	with the universally supported C++ keyword.
	* include/iomanip: Same.
	* include/loc/_locale.h: Same.
	* include/loc/_moneypunct.h: Same.
	* include/loc/_messages.h: Same.
	* include/loc/_numpunct.h: Same.
	* include/loc/_facet.h: Same.
	* include/loc/_collate.h: Same.
	* include/loc/_money_get.h: Same.
	* include/loc/_time_get.h: Same.
	* include/loc/_num_get.h: Same.
	* include/loc/_money_put.h: Same.
	* include/loc/_ctype.h: Same.
	* include/loc/_time_put.h: Same.
	* include/loc/_num_put.h: Same.
	* include/loc/_codecvt.h: Same.
	* include/map: Same.
	* include/rw/_basic_ios.h: Same.
	* include/rw/_iosfailure.h: Same.
	* include/rw/_iterator.h: Same.
	* include/rw/_smartptr.h: Same.
	* include/rw/_rawiter.h: Same.
	* include/rw/_tuple.h: Same.
	* include/rw/_autoptr.h: Same.
	* include/rw/_exception.h: Same.
	* include/bitset: Same.
	* include/set: Same.
	* include/functional: Same.
	* include/istream: Same.
	* include/stack: Same.
	* include/string: Same.
	* include/complex: Same.
	* include/ostream: Same.
	* include/sstream: Same.
	* include/valarray: Same.
	* include/vector: Same.
	* include/stdexcept: Same.
	* include/deque: Same.
	* include/list: Same.
	* include/strstream: Same.
	* include/queue: Same.
	* include/fstream: Same.
	* src/podarray.h: Same.
	* tests/localization/22.locale.synopsis.cpp: Same.
	* tests/containers/23.deque.modifiers.cpp: Same.
	* tests/containers/23.bitset.cpp: Same.
	* tests/diagnostics/19.std.exceptions.cpp: Same.
	* tests/utilities/20.function.objects.cpp: Same.

	* etc/config/src/EXPLICIT.cpp: Deleted test.

	* include/rw/_defs.h (_EXPLICIT): Removed macro #definition.
	
	* tests/containers/23.deque.modifiers.cpp (_RWSTD_NO_EXPLICIT):
	Removed conditional.
	* tests/containers/23.bitset.cpp: Same.
	* tests/utilities/20.function.objects.cpp: Same.


	2008-07-09  Travis Vitek  <vitek@roguewave.com>

	STDCXX-916
	* include/rw/_meta_help.h: Remove doxygen tags from comments.
	* include/rw/_meta_prop.h: Reduce lines to 76 characters or
	less where necessary.
	[_MSC_VER]: Simplify workaround for broken __is_pod() and
	__is_empty().
	[!_RWSTD_TT_IS_STANDARD_LAYOUT]: Change fallback for the
	__rw_is_standard_layout<> trait to be more reliable.
	[!_RWSTD_TT_IS_EMPTY]: Change fallback for __rw_is_empty<>
	trait to be more reliable.
	[!_RWSTD_TT_IS_POLYMORPHIC]: Add fallback to detect polymorphic
	class types when compiler support is not available.
	[!_RWSTD_TT_IS_ABSTRACT]: Add fallback to detect abstract
	class types when compiler support is not available.
	[!_RWSTD_TT_HAS_TRIVIAL_CTOR]: Add fallback to detect types
	that have a trivial constructor when compiler support is not
	available.
	[!_RWSTD_TT_HAS_TRIVIAL_COPY]: Add fallback to detect types
	that have a trivial copy constructor when compiler support is
	not available.
	[!_RWSTD_TT_HAS_TRIVIAL_ASSIGN]: Add fallback to detect types
	that have a trivial assignment operator when compiler support
	is not available.
	[!_RWSTD_TT_HAS_TRIVIAL_DTOR]: Add fallback to detect types
	that have a trivial destructor when compiler support is not
	available.
	[!_RWSTD_TT_HAS_NOTHROW_CTOR]: Add fallback to detect types
	that have a nothrow constructor when compiler support is not
	available.
	[!_RWSTD_TT_HAS_NOTHROW_COPY]: Add fallback to detect types
	that have a nothrow copy constructor when compiler support is
	not available.
	[!_RWSTD_TT_HAS_NOTHROW_ASSIGN]: Add fallback to detect types
	that have a nothrow assignment operator when compiler support
	is not available.
	[!_RWSTD_TT_HAS_VIRTUAL_DTOR]: Add fallback to detect types
	that have a virtual destructor when compiler support is not
	available. Currently tests that the type is polymorphic, which
	may not be entirely accurate.
	* include/rw/_meta_other.h [__GNUG__]: Use simpler implementation for
	__rw_aligned_storage<>. Reorder union members to make most strictly
	aligned member first.
	[_RWSTD_TT_MAX_ALIGNMENT]: Guard __rw_aligned_storage_impl<>
	specializations to prevent their use when the requested alignment
	is out of range.
	* include/rw/_meta_comp.h: Reduce lines to 76 characters or less.
	* include/rw/_meta_cat.h: Add __rw_is_class_or_union<> helper.
	[!_RWSTD_TT_IS_CLASS]: Add fallback to detect class types, using
	_RWSTD_TT_IS_UNION if available.
	[!_RWSTD_TT_IS_UNION]: Add fallback to detect union types, using
	_RWSTD_TT_IS_CLASS if available.
	[!_RWSTD_TT_IS_ENUM]: Add fallback to detect enum types when compiler
	support is not available.
	[!_RWSTD_TT_IS_FUNCTION]: Fix fallback for __rw_is_function to avoid
	compiler warnings on HP aCC 6.16.
	* include/rw/_meta_ref.h: Reduce lines to 76 characters or less.
	Remove use of _TYPENAME macro.
	* include/rw/_meta_rel.h: Fix __rw_is_convertible_impl to avoid 
	warning on HP aCC 6.16. Reduce lines to 76 characters or less.
	Remove use of _TYPENAME macro. Fix __rw_is_convertible_impl<> to
	avoid compiler warnings on HP aCC 6.16.
	[_RWSTD_TT_IS_CONVERTIBLE]: Guard header inclusion. Rename template
	parameters to _From and _To for clarity.
	[_RWSTD_TT_IS_BASE_OF]: Guard header inclusion. Change fallback for
	__rw_is_base_of to be more reliable. Rename template parameters to
	_Base and _Derived for clarity.
	* include/rw/_config-gcc.h [__GNUG__]: Reduce lines to 76 characters
	or less where necessary. Work around issue with gcc aligned attribute
	so we can use it to define __rw_aligned_storage<>.
	* include/rw/_config-acc.h [__HP_aCC]: Add macros _RWSTD_TT_ALIGN_OF,
	_RWSTD_TT_MAX_ALIGNMENT, and _RWSTD_TT_ALIGNED_POD.
	* include/rw/_config-msvc.h [_MSC_VER]: Remove comments about broken
	__is_pod(). Reduce lines to 76 characters or less where necessary.
	Provide accurate definition of _RWSTD_TT_MAX_ALIGNMENT.
	* tests/utilities/20.meta.trans.other.cpp: Add include for stddef.h.
	Use std::alignment_of<> instead of __alignof() for portability. Test
	default alignment for various aligned storage sizes.
	* tests/utilities/20.meta.rel.cpp (test_is_base_of): Fix test cases
	that were failing due to parameter ordering.


	2008-07-10  Martin Sebor  <sebor@roguewave.com>

	STDCXX-990
	* include/rw/_defs.h [2 < __GNUG__](_RWSTD_VA_COPY): Unconditionally
	defined to gcc's __builtin_va_copy() to avoid errors due to potential
	configuration differences (e.g., after configuring in C++ 1998 mode
	and compiling with the -std=c++0x option).


	2008-07-10  Martin Sebor  <sebor@roguewave.com>

	* include/rw/_config-gcc.h [gcc >= 4.3 && __GXX_EXPERIMENTAL_CXX0X__]
	(_RWSTD_NO_VARIADIC_TEMPLATES, _RWSTD_NO_RVALUE_REFERENCES): Undefined
	to make it possible to use C++ 0x library extensions even in builds
	configured w/o C++ 0x extensions enabled in the compiler.
	(_RWSTD_EXT_CXX_0X): #defined in response to either of the -std=c++0x
	or -std=gnu++0x options.


	2008-07-14  Martin Sebor  <sebor@roguewave.com>

	* etc/config/src/INITIALIZER_LIST.cpp: New config test to determine
	whether the C++ 0x class template std::initializer_list is supported.


	2008-07-16  Travis Vitek  <vitek@roguewave.com>

	* tests/utilities/20.meta.unary.prop.cpp: Add empty throw spec to
	help convince eccp-3.10 that functions won't throw.


	2008-07-16  Eric Lemings <eric.lemings@roguewave.com>

	STDCXX-958
	* tests/include/20.tuple.h: Remove commented member function.


	2008-07-16  Eric Lemings <eric.lemings@roguewave.com>

	STDCXX-958
	* tests/utilities/20.tuple.cnstr.cpp: Simplify random character
	generation.


	2008-07-18  Eric Lemings <eric.lemings@roguewave.com>

	STDCXX-958
	* include/rw/_tuple.h (operator==): Minor formatting change.
	(operator<): Fixed lexicographical comparison logic.
	* tests/utilities/20.tuple.h: Remove global tuple typedefs and
	unused output opeator<<.
	* tests/utilities/20.tuple.cnstr.cpp: Replaced typedefs with
	explicit tuple types.  Added TUPLE macros where tuple types
	containing commas are used as function macro arguments.
	* tests/utilities/20.tuple.creation.cpp: Same.
	* tests/utilities/20.tuple.elem.cpp: Same.
	* tests/utilities/20.tuple.helpers.cpp: Same.
	* tests/utilities/20.tuple.rel.cpp: Same.  Also added more tests
	(which uncovered broken `operator<') and concise TEST() function
	macro wrapper.


	2008-07-19  Martin Sebor  <sebor@roguewave.com>

	* tests/utilities/20.meta.unary.nothrow.cpp: New test exercising
	just the has_nothrow_xxx traits (so far has_nothrow_copy_constructor
	only).


	2008-07-21  Eric Lemings  <eric.lemings@roguewave.com>

	STDCXX-808
	* tests/regress/27.streambuf.buffer.stdcxx-808.cpp: Add
	regression test case that has failed in previous releases.


	2008-07-22  Travis Vitek  <vitek@roguewave.com>

	STDCXX-1002
	* include/rw/_meta_prop.h [__SUNPRO_CC]: Work around sunpro-5.9
	detecting cv-qualifiers on array types.


	2008-07-22  Travis Vitek  <vitek@roguewave.com>

	STDCXX-1001
	* include/rw/_meta_arr.h [__IBMCPP__]: Conditionally compile out
	definitions of traits that are partial specializations of unbound array
	types to avoid issues on vacpp-9.0.
	* include/rw/_meta_cat.h: Ditto.
	* include/rw/_meta_prop.h: Ditto.


	2008-07-22  Eric Lemings  <eric.lemings@roguewave.com>

	STDCXX-808
	* tests/regress/27.streambuf.buffer.stdcxx-808.cpp: Add file
	header comment.


	2008-07-22  Eric Lemings  <eric.lemings@roguewave.com>

	STDCXX-978
	* README: Removed _RWSTD_NO_MEMBER_TEMPLATES section.

	* etc/config/src/MEMBER_TEMPLATE_OVERLOAD.cpp: Removed config
	test.  (Assume required compiler support for member templates
	in all subsequent releases.)
	* etc/config/src/MEMBER_TEMPLATES.cpp: Same.
	* etc/config/src/implicit_inclusion_imp.h: Removed #if
	directives and code compiled when no member templates supported.
	* etc/config/src/IMPLICIT_INCLUSION.cpp: Same.
	* etc/config/src/extern_template_imp.h: Same.
	* etc/config/src/EXTERN_MEMBER_TEMPLATE.cpp: Same.
	* etc/config/src/extern_template_imp.cpp: Same.
	* etc/config/src/implicit_inclusion_imp.cc: Same.

	* include/bitest [_RWSTD_NO_MEMBER_TEMPLATES]: Removed #if
	directives leaving code compiled when macro is not defined and
	removing (unused) code that is compiled when macro is defined.
	* include/complex: Same.
	* include/deque: Same.
	* include/deque.cc: Same.
	* include/list: Same.
	* include/list.cc: Same.
	* include/set: Same.
	* include/string: Same.
	* include/string.cc: Same.
	* include/vector: Same.
	* include/vector.cc: Same.

	* src/vecbool.cpp [_RWSTD_NO_MEMBER_TEMPLATES]: Removed
	unused code compiled when no member templates supported.

	* tests/utilities/20.auto.ptr.cpp [_RWSTD_NO_MEMBER_TEMPLATES]:
	Removed #if directives.  (Most code was already being compiled.
	Two directives were not but the code appears harmless.)
	* tests/containers/23.bitset.cpp: Same.
	* tests/localization/22.locale.synopsis.cpp: Same.
	* tests/strings/21.string.exceptions.cpp: Same.

	* examples/include/stocks.h: Removed unused code.


	2008-07-22  Travis Vitek  <vitek@roguewave.com>

	* include/type_traits [_RWSTD_NO_ALIGN_TRAITS]: Conditionally remove
	traits that deal with alignment as there is a good chance they will
	be removed from the draft.
	* include/rw/_defs.h: Define _RWSTD_NO_ALIGN_TRAITS if one or more of
	the alignment helper macros is not provided.
	* include/rw/_meta_prop.h: Stop defining _TT_ macros in workarounds.
	Add fallback for alignment_of<>. Temporarily remove msvc-8.0 workarounds.
	* include/rw/_meta_other.h: Simplify implementation of aligned_storage
	and aligned_union traits.
	* include/rw/_config-acc.h: Update comment after guard macro.
	* include/rw/_config-gcc.h: Remove _RWSTD_EXT_CXX_0X macro.
	* include/rw/_config-eccp.h: Disable a few built-in traits.
	* include/rw/_config.h: Remove _RWSTD_EXT_CXX_0X macro.
	* tests/include/rw/rw_testdefs.h: Enable strict conformance testing for
	next version of EDG C++ and G++.
	* tests/utilities/20.meta.trans.other.cpp (test_aligned_storage):
	Disable testing aligned_storage<> and aligned_union<> if compiler
	support is unavailable or disabled.
	* tests/utilities/20.meta.unary.nothrow.cpp (run_test): Move test body
	to new function.
	(test_has_nothrow_copy): Add new function. Conditionally disable tests
	for types that require rvalue-references or variadic template support.
	Conditionally disable test when compiler support is unavailable.
	* tests/utilities/20.meta.unary.cat.cpp (test_trait): Fix assert to
	display correct line number. Update warning message.
	(test_is_union): Conditionally disable test when compiler support is
	unavailable.
	* tests/utilities/20.meta.unary.prop.cpp: Conditionally disable parts
	of tests that require compiler support. Add assertsions to several of
	the test_has_trivial_* and test_has_nothrow_* tests. Expect traits
	has_trivial_assign, has_trivial_copy, has_nothrow_assign and
	has_nothrow_copy to fail for array types.
	(test_alignment_of): Add tests for alignment_of. 
	* tests/utilities/20.meta.unary.rel.cpp: Append a `t' to a few
	internal test class names.
	(test_is_base_of): Disable portion of test if required support
	is not available.


	2008-07-28  Travis Vitek  <vitek@roguewave.com>

	* tests/src/thread.cpp [__EDG__]: Disable error for use of long long
	in pthreadtypes.h system header.


	2008-07-31  Martin Sebor  <sebor@roguewave.com>

	* tests/src/thread.cpp [_RWSTD_POSIX_THREADS]: Simplified
	preprocessor conditional logic introduced in rev 680574.




git-svn-id: https://svn.apache.org/repos/asf/stdcxx/trunk@681820 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/README b/README
index 63b8c12..5e62ccf 100644
--- a/README
+++ b/README
@@ -1054,12 +1054,6 @@
      #defined when  explicit instantiation of member  templates is not
       supported.
 
-  o  _RWSTD_NO_MEMBER_TEMPLATES [abi, auto]
-
-     #defined  when member  templates are  not supported.  The library
-     tries to  provide alternative solutions  wherever possible.  Some
-     loss of functionality is inevitable. 
-
   o  _RWSTD_REENTRANT [abi, auto, lib]
 
      #defined  for multi-thread  safe  build types  12[sd] and  15[sd]
@@ -1179,10 +1173,6 @@
      the  public library  header  <new> do  not  include the  required
      exception specifications.
 
-  o  _RWSTD_NO_TYPENAME [auto]
-
-     #defined when they keyword typename isn't fully supported.
-
   o  _RWSTD_NO_COLLAPSE_STATIC_LOCALS [auto]
 
      #defined when  the compiler/linker fail to  collapse static local
diff --git a/doc/Doxyfile b/doc/Doxyfile
deleted file mode 100644
index 318627e..0000000
--- a/doc/Doxyfile
+++ /dev/null
@@ -1,1417 +0,0 @@
-# Doxyfile 1.5.6
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-#       TAG = value [value, ...]
-# For lists items can also be appended using:
-#       TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file 
-# that follow. The default is UTF-8 which is also the encoding used for all 
-# text before the first occurrence of this tag. Doxygen uses libiconv (or the 
-# iconv built into libc) for the transcoding. See 
-# http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-DOXYFILE_ENCODING      = UTF-8
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
-# by quotes) that should identify the project.
-
-PROJECT_NAME           = "Apache C++ Standard Library"
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
-# This could be handy for archiving the generated documentation or 
-# if some version control system is used.
-
-PROJECT_NUMBER         = 4.3.0
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
-# base path where the generated documentation will be put. 
-# If a relative path is entered, it will be relative to the location 
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY       = $(BUILDDIR)/doc
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
-# 4096 sub-directories (in 2 levels) under the output directory of each output 
-# format and will distribute the generated files over these directories. 
-# Enabling this option can be useful when feeding doxygen a huge amount of 
-# source files, where putting all generated files in the same directory would 
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS         = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
-# documentation generated by doxygen is written. Doxygen will use this 
-# information to generate all constant output in the proper language. 
-# The default language is English, other supported languages are: 
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 
-# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, 
-# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), 
-# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, 
-# Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, 
-# and Ukrainian.
-
-OUTPUT_LANGUAGE        = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
-# include brief member descriptions after the members that are listed in 
-# the file and class documentation (similar to JavaDoc). 
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC      = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
-# the brief description of a member or function before the detailed description. 
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF           = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator 
-# that is used to form the text in various listings. Each string 
-# in this list, if found as the leading text of the brief description, will be 
-# stripped from the text and the result after processing the whole list, is 
-# used as the annotated text. Otherwise, the brief description is used as-is. 
-# If left blank, the following values are used ("$name" is automatically 
-# replaced with the name of the entity): "The $name class" "The $name widget" 
-# "The $name file" "is" "provides" "specifies" "contains" 
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF       = 
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
-# Doxygen will generate a detailed section even if there is only a brief 
-# description.
-
-ALWAYS_DETAILED_SEC    = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
-# inherited members of a class in the documentation of that class as if those 
-# members were ordinary class members. Constructors, destructors and assignment 
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB  = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
-# path before files name in the file list and in the header files. If set 
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES        = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
-# can be used to strip a user-defined part of the path. Stripping is 
-# only done if one of the specified strings matches the left-hand part of 
-# the path. The tag can be used to show relative paths in the file list. 
-# If left blank the directory from which doxygen is run is used as the 
-# path to strip.
-
-STRIP_FROM_PATH        = 
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
-# the path mentioned in the documentation of a class, which tells 
-# the reader which header file to include in order to use a class. 
-# If left blank only the name of the header file containing the class 
-# definition is used. Otherwise one should specify the include paths that 
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH    = 
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
-# (but less readable) file names. This can be useful is your file systems 
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES            = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
-# will interpret the first line (until the first dot) of a JavaDoc-style 
-# comment as the brief description. If set to NO, the JavaDoc 
-# comments will behave just like regular Qt-style comments 
-# (thus requiring an explicit @brief command for a brief description.)
-
-JAVADOC_AUTOBRIEF      = NO
-
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will 
-# interpret the first line (until the first dot) of a Qt-style 
-# comment as the brief description. If set to NO, the comments 
-# will behave just like regular Qt-style comments (thus requiring 
-# an explicit \brief command for a brief description.)
-
-QT_AUTOBRIEF           = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
-# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
-# comments) as a brief description. This used to be the default behaviour. 
-# The new default is to treat a multi-line C++ comment block as a detailed 
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the DETAILS_AT_TOP tag is set to YES then Doxygen 
-# will output the detailed description near the top, like JavaDoc.
-# If set to NO, the detailed description appears after the member 
-# documentation.
-
-DETAILS_AT_TOP         = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
-# member inherits the documentation from any documented member that it 
-# re-implements.
-
-INHERIT_DOCS           = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
-# a new page for each member. If set to NO, the documentation of a member will 
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES  = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE               = 4
-
-# This tag can be used to specify a number of aliases that acts 
-# as commands in the documentation. An alias has the form "name=value". 
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
-# put the command \sideeffect (or @sideeffect) in the documentation, which 
-# will result in a user-defined paragraph with heading "Side Effects:". 
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES                = 
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
-# sources only. Doxygen will then generate output that is more tailored for C. 
-# For instance, some of the names that are used will be different. The list 
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C  = NO
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 
-# sources only. Doxygen will then generate output that is more tailored for 
-# Java. For instance, namespaces will be presented as packages, qualified 
-# scopes will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA   = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran 
-# sources only. Doxygen will then generate output that is more tailored for 
-# Fortran.
-
-OPTIMIZE_FOR_FORTRAN   = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL 
-# sources. Doxygen will then generate output that is tailored for 
-# VHDL.
-
-OPTIMIZE_OUTPUT_VHDL   = NO
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want 
-# to include (a tag file for) the STL sources as input, then you should 
-# set this tag to YES in order to let doxygen match functions declarations and 
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 
-# func(std::string) {}). This also make the inheritance and collaboration 
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT    = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-
-CPP_CLI_SUPPORT        = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. 
-# Doxygen will parse them like normal C++ but will assume all classes use public 
-# instead of private inheritance when no explicit protection keyword is present.
-
-SIP_SUPPORT            = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate getter 
-# and setter methods for a property. Setting this option to YES (the default) 
-# will make doxygen to replace the get and set methods by a property in the 
-# documentation. This will only work if the methods are indeed getting or 
-# setting a simple type. If this is not the case, or you want to show the 
-# methods anyway, you should set this option to NO.
-
-IDL_PROPERTY_SUPPORT   = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
-# tag is set to YES, then doxygen will reuse the documentation of the first 
-# member in the group (if any) for the other members of the group. By default 
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC   = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
-# the same type (for instance a group of public functions) to be put as a 
-# subgroup of that type (e.g. under the Public Functions section). Set it to 
-# NO to prevent subgrouping. Alternatively, this can be done per class using 
-# the \nosubgrouping command.
-
-SUBGROUPING            = YES
-
-# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum 
-# is documented as struct, union, or enum with the name of the typedef. So 
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct 
-# with name TypeT. When disabled the typedef will appear as a member of a file, 
-# namespace, or class. And the struct will be named TypeS. This can typically 
-# be useful for C code in case the coding convention dictates that all compound 
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-
-TYPEDEF_HIDES_STRUCT   = NO
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
-# documentation are documented, even if no documentation was available. 
-# Private class members and static file members will be hidden unless 
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL            = NO
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
-# will be included in the documentation.
-
-EXTRACT_PRIVATE        = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file 
-# will be included in the documentation.
-
-EXTRACT_STATIC         = NO
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
-# defined locally in source files will be included in the documentation. 
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES  = YES
-
-# This flag is only useful for Objective-C code. When set to YES local 
-# methods, which are defined in the implementation section but not in 
-# the interface are included in the documentation. 
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS  = NO
-
-# If this flag is set to YES, the members of anonymous namespaces will be 
-# extracted and appear in the documentation as a namespace called 
-# 'anonymous_namespace{file}', where file will be replaced with the base 
-# name of the file that contains the anonymous namespace. By default 
-# anonymous namespace are hidden.
-
-EXTRACT_ANON_NSPACES   = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
-# undocumented members of documented classes, files or namespaces. 
-# If set to NO (the default) these members will be included in the 
-# various overviews, but no documentation section is generated. 
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS     = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
-# undocumented classes that are normally visible in the class hierarchy. 
-# If set to NO (the default) these classes will be included in the various 
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES     = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
-# friend (class|struct|union) declarations. 
-# If set to NO (the default) these declarations will be included in the 
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS  = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
-# documentation blocks found inside the body of a function. 
-# If set to NO (the default) these blocks will be appended to the 
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS      = NO
-
-# The INTERNAL_DOCS tag determines if documentation 
-# that is typed after a \internal command is included. If the tag is set 
-# to NO (the default) then the documentation will be excluded. 
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS          = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
-# file names in lower-case letters. If set to YES upper-case letters are also 
-# allowed. This is useful if you have classes or files whose names only differ 
-# in case and if your file system supports case sensitive file names. Windows 
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES       = NO
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
-# will show members with their full class and namespace scopes in the 
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES       = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
-# will put a list of the files that are included by a file in the documentation 
-# of that file.
-
-SHOW_INCLUDE_FILES     = YES
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
-# is inserted in the documentation for inline members.
-
-INLINE_INFO            = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
-# will sort the (detailed) documentation of file and class members 
-# alphabetically by member name. If set to NO the members will appear in 
-# declaration order.
-
-SORT_MEMBER_DOCS       = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
-# brief documentation of file, namespace and class members alphabetically 
-# by member name. If set to NO (the default) the members will appear in 
-# declaration order.
-
-SORT_BRIEF_DOCS        = NO
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the 
-# hierarchy of group names into alphabetical order. If set to NO (the default) 
-# the group names will appear in their defined order.
-
-SORT_GROUP_NAMES       = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
-# sorted by fully-qualified names, including namespaces. If set to 
-# NO (the default), the class list will be sorted only by class name, 
-# not including the namespace part. 
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the 
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME     = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or 
-# disable (NO) the todo list. This list is created by putting \todo 
-# commands in the documentation.
-
-GENERATE_TODOLIST      = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or 
-# disable (NO) the test list. This list is created by putting \test 
-# commands in the documentation.
-
-GENERATE_TESTLIST      = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or 
-# disable (NO) the bug list. This list is created by putting \bug 
-# commands in the documentation.
-
-GENERATE_BUGLIST       = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
-# disable (NO) the deprecated list. This list is created by putting 
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional 
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS       = User
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
-# the initial value of a variable or define consists of for it to appear in 
-# the documentation. If the initializer consists of more lines than specified 
-# here it will be hidden. Use a value of 0 to hide initializers completely. 
-# The appearance of the initializer of individual variables and defines in the 
-# documentation can be controlled using \showinitializer or \hideinitializer 
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES  = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
-# at the bottom of the documentation of classes and structs. If set to YES the 
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES        = YES
-
-# If the sources in your project are distributed over multiple directories 
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
-# in the documentation. The default is NO.
-
-SHOW_DIRECTORIES       = NO
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
-# This will remove the Files entry from the Quick Index and from the 
-# Folder Tree View (if specified). The default is YES.
-
-SHOW_FILES             = YES
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the 
-# Namespaces page.  This will remove the Namespaces entry from the Quick Index
-# and from the Folder Tree View (if specified). The default is YES.
-
-SHOW_NAMESPACES        = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
-# doxygen should invoke to get the current version for each file (typically from 
-# the version control system). Doxygen will invoke the program by executing (via 
-# popen()) the command <command> <input-file>, where <command> is the value of 
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
-# provided by doxygen. Whatever the program writes to standard output 
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER    = 
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated 
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET                  = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are 
-# generated by doxygen. Possible values are YES and NO. If left blank 
-# NO is used.
-
-WARNINGS               = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED   = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
-# potential errors in the documentation, such as not documenting some 
-# parameters in a documented function, or documenting parameters that 
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR      = YES
-
-# This WARN_NO_PARAMDOC option can be abled to get warnings for 
-# functions that are documented, but have no documentation for their parameters 
-# or return value. If set to NO (the default) doxygen will only warn about 
-# wrong or incomplete parameter documentation, but not about the absence of 
-# documentation.
-
-WARN_NO_PARAMDOC       = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that 
-# doxygen can produce. The string should contain the $file, $line, and $text 
-# tags, which will be replaced by the file and line number from which the 
-# warning originated and the warning text. Optionally the format may contain 
-# $version, which will be replaced by the version of the file (if it could 
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT            = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning 
-# and error messages should be written. If left blank the output is written 
-# to stderr.
-
-WARN_LOGFILE           = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain 
-# documented source files. You may enter file names like "myfile.cpp" or 
-# directories like "/usr/src/myproject". Separate the files or directories 
-# with spaces.
-
-INPUT                  = $(SRCDIR)/include $(SRCDIR)/src
-
-# This tag can be used to specify the character encoding of the source files 
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is 
-# also the default input encoding. Doxygen uses libiconv (or the iconv built 
-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for 
-# the list of possible encodings.
-
-INPUT_ENCODING         = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the 
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank the following patterns are tested: 
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx 
-# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
-
-FILE_PATTERNS          = [_a-z]*
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
-# should be searched for input files as well. Possible values are YES and NO. 
-# If left blank NO is used.
-
-RECURSIVE              = YES
-
-# The EXCLUDE tag can be used to specify files and/or directories that should 
-# excluded from the INPUT source files. This way you can easily exclude a 
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-
-EXCLUDE                = 
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
-# directories that are symbolic links (a Unix filesystem feature) are excluded 
-# from the input.
-
-EXCLUDE_SYMLINKS       = NO
-
-# If the value of the INPUT tag contains directories, you can use the 
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
-# certain files from those directories. Note that the wildcards are matched 
-# against the file with absolute path, so to exclude all test directories 
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS       = */.svn/*
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 
-# (namespaces, classes, functions, etc.) that should be excluded from the 
-# output. The symbol name can be a fully qualified name, a word, or if the 
-# wildcard * is used, a substring. Examples: ANamespace, AClass, 
-# AClass::ANamespace, ANamespace::*Test
-
-EXCLUDE_SYMBOLS        = 
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or 
-# directories that contain example code fragments that are included (see 
-# the \include command).
-
-EXAMPLE_PATH           = 
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank all files are included.
-
-EXAMPLE_PATTERNS       = 
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
-# searched for input files to be used with the \include or \dontinclude 
-# commands irrespective of the value of the RECURSIVE tag. 
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE      = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or 
-# directories that contain image that are included in the documentation (see 
-# the \image command).
-
-IMAGE_PATH             = 
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should 
-# invoke to filter for each input file. Doxygen will invoke the filter program 
-# by executing (via popen()) the command <filter> <input-file>, where <filter> 
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
-# input file. Doxygen will then use the output that the filter program writes 
-# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
-# ignored.
-
-INPUT_FILTER           = 
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
-# basis.  Doxygen will compare the file name with each pattern and apply the 
-# filter if there is a match.  The filters are a list of the form: 
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
-# is applied to all files.
-
-FILTER_PATTERNS        = 
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
-# INPUT_FILTER) will be used to filter the input files when producing source 
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES    = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
-# be generated. Documented entities will be cross-referenced with these sources. 
-# Note: To get rid of all source code in the generated output, make sure also 
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER         = NO
-
-# Setting the INLINE_SOURCES tag to YES will include the body 
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES         = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
-# doxygen to hide any special comment blocks from generated source code 
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS    = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES 
-# then for each documented function all documented 
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = NO
-
-# If the REFERENCES_RELATION tag is set to YES 
-# then for each documented function all documented entities 
-# called/used by that function will be listed.
-
-REFERENCES_RELATION    = NO
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code.  Otherwise they will link to the documentstion.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code 
-# will point to the HTML generated by the htags(1) tool instead of doxygen 
-# built-in source browser. The htags tool is part of GNU's global source 
-# tagging system (see http://www.gnu.org/software/global/global.html). You 
-# will need version 4.8.6 or higher.
-
-USE_HTAGS              = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
-# will generate a verbatim copy of the header file for each class for 
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS       = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
-# of all compounds will be generated. Enable this if the project 
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX     = NO
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX    = 5
-
-# In case all classes in a project start with a common prefix, all 
-# classes will be put under the same header in the alphabetical index. 
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX          = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
-# generate HTML output.
-
-GENERATE_HTML          = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT            = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION    = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for 
-# each generated HTML page. If it is left blank doxygen will generate a 
-# standard header.
-
-HTML_HEADER            = 
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
-# each generated HTML page. If it is left blank doxygen will generate a 
-# standard footer.
-
-HTML_FOOTER            = 
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
-# style sheet that is used by each HTML page. It can be used to 
-# fine-tune the look of the HTML output. If the tag is left blank doxygen 
-# will generate a default style sheet. Note that doxygen will try to copy 
-# the style sheet file to the HTML output directory, so don't put your own 
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET        = 
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
-# files or namespaces will be aligned in HTML using tables. If set to 
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS     = YES
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
-# will be generated that can be used as input for tools like the 
-# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) 
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP      = NO
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files 
-# will be generated that can be used as input for Apple's Xcode 3 
-# integrated development environment, introduced with OSX 10.5 (Leopard). 
-# To create a documentation set, doxygen will generate a Makefile in the 
-# HTML output directory. Running make will produce the docset in that 
-# directory and running "make install" will install the docset in 
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find 
-# it at startup.
-
-GENERATE_DOCSET        = NO
-
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the 
-# feed. A documentation feed provides an umbrella under which multiple 
-# documentation sets from a single provider (such as a company or product suite) 
-# can be grouped.
-
-DOCSET_FEEDNAME        = "Doxygen generated docs"
-
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that 
-# should uniquely identify the documentation set bundle. This should be a 
-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen 
-# will append .docset to the name.
-
-DOCSET_BUNDLE_ID       = org.doxygen.Project
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML 
-# documentation will contain sections that can be hidden and shown after the 
-# page has loaded. For this to work a browser that supports 
-# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox 
-# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
-
-HTML_DYNAMIC_SECTIONS  = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
-# be used to specify the file name of the resulting .chm file. You 
-# can add a path in front of the file if the result should not be 
-# written to the html output directory.
-
-CHM_FILE               = 
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
-# be used to specify the location (absolute path including file name) of 
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION           = 
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
-# controls if a separate .chi index file is generated (YES) or that 
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI           = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
-# is used to encode HtmlHelp index (hhk), content (hhc) and project file
-# content.
-
-CHM_INDEX_ENCODING     = 
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
-# controls whether a binary table of contents is generated (YES) or a 
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC             = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members 
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND             = NO
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
-# top of each HTML page. The value NO (the default) enables the index and 
-# the value YES disables it.
-
-DISABLE_INDEX          = NO
-
-# This tag can be used to set the number of enum values (range [1..20]) 
-# that doxygen will group on one line in the generated HTML documentation.
-
-ENUM_VALUES_PER_LINE   = 4
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information.
-# If the tag value is set to FRAME, a side panel will be generated
-# containing a tree-like index structure (just like the one that 
-# is generated for HTML Help). For this to work a browser that supports 
-# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, 
-# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
-# probably better off using the HTML help feature. Other possible values 
-# for this tag are: HIERARCHIES, which will generate the Groups, Directories,
-# and Class Hiererachy pages using a tree view instead of an ordered list;
-# ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which
-# disables this behavior completely. For backwards compatibility with previous
-# releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE
-# respectively.
-
-GENERATE_TREEVIEW      = NONE
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
-# used to set the initial width (in pixels) of the frame in which the tree 
-# is shown.
-
-TREEVIEW_WIDTH         = 250
-
-# Use this tag to change the font size of Latex formulas included 
-# as images in the HTML documentation. The default is 10. Note that 
-# when you change the font size after a successful doxygen run you need 
-# to manually remove any form_*.png images from the HTML output directory 
-# to force them to be regenerated.
-
-FORMULA_FONTSIZE       = 10
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
-# generate Latex output.
-
-GENERATE_LATEX         = YES
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT           = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
-# invoked. If left blank `latex' will be used as the default command name.
-
-LATEX_CMD_NAME         = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
-# generate index for LaTeX. If left blank `makeindex' will be used as the 
-# default command name.
-
-MAKEINDEX_CMD_NAME     = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
-# LaTeX documents. This may be useful for small projects and may help to 
-# save some trees in general.
-
-COMPACT_LATEX          = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used 
-# by the printer. Possible values are: a4, a4wide, letter, legal and 
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE             = a4wide
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES         = 
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
-# the generated latex document. The header should contain everything until 
-# the first chapter. If it is left blank doxygen will generate a 
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER           = 
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
-# contain links (just like the HTML output) instead of page references 
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS         = YES
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
-# plain latex in the generated Makefile. Set this option to YES to get a 
-# higher quality PDF documentation.
-
-USE_PDFLATEX           = YES
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
-# command to the generated LaTeX files. This will instruct LaTeX to keep 
-# running if errors occur, instead of asking the user for help. 
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE        = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
-# include the index chapters (such as File Index, Compound Index, etc.) 
-# in the output.
-
-LATEX_HIDE_INDICES     = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
-# The RTF output is optimized for Word 97 and may not look very pretty with 
-# other RTF readers or editors.
-
-GENERATE_RTF           = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT             = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
-# RTF documents. This may be useful for small projects and may help to 
-# save some trees in general.
-
-COMPACT_RTF            = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
-# will contain hyperlink fields. The RTF file will 
-# contain links (just like the HTML output) instead of page references. 
-# This makes the output suitable for online browsing using WORD or other 
-# programs which support those fields. 
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS         = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's 
-# config file, i.e. a series of assignments. You only have to provide 
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE    = 
-
-# Set optional variables used in the generation of an rtf document. 
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE    = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
-# generate man pages
-
-GENERATE_MAN           = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT             = man
-
-# The MAN_EXTENSION tag determines the extension that is added to 
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION          = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
-# then it will generate one additional man file for each entity 
-# documented in the real man page(s). These additional files 
-# only source the real man page, but without them the man command 
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS              = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will 
-# generate an XML file that captures the structure of 
-# the code including all documentation.
-
-GENERATE_XML           = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT             = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema, 
-# which can be used by a validating XML parser to check the 
-# syntax of the XML files.
-
-XML_SCHEMA             = 
-
-# The XML_DTD tag can be used to specify an XML DTD, 
-# which can be used by a validating XML parser to check the 
-# syntax of the XML files.
-
-XML_DTD                = 
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
-# dump the program listings (including syntax highlighting 
-# and cross-referencing information) to the XML output. Note that 
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING     = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
-# generate an AutoGen Definitions (see autogen.sf.net) file 
-# that captures the structure of the code including all 
-# documentation. Note that this feature is still experimental 
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF   = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
-# generate a Perl module file that captures the structure of 
-# the code including all documentation. Note that this 
-# feature is still experimental and incomplete at the 
-# moment.
-
-GENERATE_PERLMOD       = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX          = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
-# nicely formatted so it can be parsed by a human reader.  This is useful 
-# if you want to understand what is going on.  On the other hand, if this 
-# tag is set to NO the size of the Perl module output will be much smaller 
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY         = YES
-
-# The names of the make variables in the generated doxyrules.make file 
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
-# This is useful so different doxyrules.make files included by the same 
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX = 
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor   
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
-# evaluate all C-preprocessor directives found in the sources and include 
-# files.
-
-ENABLE_PREPROCESSING   = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
-# names in the source code. If set to NO (the default) only conditional 
-# compilation will be performed. Macro expansion can be done in a controlled 
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION        = YES
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
-# then the macro expansion is limited to the macros specified with the 
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF     = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
-
-SEARCH_INCLUDES        = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that 
-# contain include files that are not input files but should be processed by 
-# the preprocessor.
-
-INCLUDE_PATH           = $(SRCDIR)/include $(BUILDDIR)/include $(SRCDIR)/include/ansi
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
-# patterns (like *.h and *.hpp) to filter out the header-files in the 
-# directories. If left blank, the patterns specified with FILE_PATTERNS will 
-# be used.
-
-INCLUDE_FILE_PATTERNS  = 
-
-# The PREDEFINED tag can be used to specify one or more macro names that 
-# are defined before the preprocessor is started (similar to the -D option of 
-# gcc). The argument of the tag is a list of macros of the form: name 
-# or name=definition (no spaces). If the definition and the = are 
-# omitted =1 is assumed. To prevent a macro definition from being 
-# undefined via #undef or recursively expanded use the := operator 
-# instead of the = operator.
-
-PREDEFINED             = -D_RWSTD_EXT_CXX_0X
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
-# this tag can be used to specify a list of macro names that should be expanded. 
-# The macro definition that is found in the sources will be used. 
-# Use the PREDEFINED tag if you want to use a different macro definition.
-
-EXPAND_AS_DEFINED      = 
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
-# doxygen's preprocessor will remove all function-like macros that are alone 
-# on a line, have an all uppercase name, and do not end with a semicolon. Such 
-# function macros are typically used for boiler-plate code, and will confuse 
-# the parser if not removed.
-
-SKIP_FUNCTION_MACROS   = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references   
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles. 
-# Optionally an initial location of the external documentation 
-# can be added for each tagfile. The format of a tag file without 
-# this location is as follows: 
-#   TAGFILES = file1 file2 ... 
-# Adding location for the tag files is done as follows: 
-#   TAGFILES = file1=loc1 "file2 = loc2" ... 
-# where "loc1" and "loc2" can be relative or absolute paths or 
-# URLs. If a location is present for each tag, the installdox tool 
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen 
-# is run, you must also specify the path to the tagfile here.
-
-TAGFILES               = 
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE       = 
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
-# in the class index. If set to NO only the inherited external classes 
-# will be listed.
-
-ALLEXTERNALS           = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
-# in the modules index. If set to NO, only the current project's groups will 
-# be listed.
-
-EXTERNAL_GROUPS        = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script 
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH              = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool   
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
-# or super classes. Setting the tag to NO turns the diagrams off. Note that 
-# this option is superseded by the HAVE_DOT option below. This is only a 
-# fallback. It is recommended to install and use dot, since it yields more 
-# powerful graphs.
-
-CLASS_DIAGRAMS         = YES
-
-# You can define message sequence charts within doxygen comments using the \msc 
-# command. Doxygen will then run the mscgen tool (see 
-# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the 
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where 
-# the mscgen tool resides. If left empty the tool is assumed to be found in the 
-# default search path.
-
-MSCGEN_PATH            = 
-
-# If set to YES, the inheritance and collaboration graphs will hide 
-# inheritance and usage relations if the target is undocumented 
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS   = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
-# available from the path. This tool is part of Graphviz, a graph visualization 
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT               = NO
-
-# By default doxygen will write a font called FreeSans.ttf to the output 
-# directory and reference it in all dot files that doxygen generates. This 
-# font does not include all possible unicode characters however, so when you need 
-# these (or just want a differently looking font) you can specify the font name 
-# using DOT_FONTNAME. You need need to make sure dot is able to find the font, 
-# which can be done by putting it in a standard location or by setting the 
-# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory 
-# containing the font.
-
-DOT_FONTNAME           = FreeSans
-
-# By default doxygen will tell dot to use the output directory to look for the 
-# FreeSans.ttf font (which doxygen will put there itself). If you specify a 
-# different font using DOT_FONTNAME you can set the path where dot 
-# can find it using this tag.
-
-DOT_FONTPATH           = 
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect inheritance relations. Setting this tag to YES will force the 
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH            = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect implementation dependencies (inheritance, containment, and 
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH    = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS           = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
-# collaboration diagrams in a style similar to the OMG's Unified Modeling 
-# Language.
-
-UML_LOOK               = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the 
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS     = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
-# tags are set to YES then doxygen will generate a graph for each documented 
-# file showing the direct and indirect include dependencies of the file with 
-# other documented files.
-
-INCLUDE_GRAPH          = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
-# documented header file showing the documented files that directly or 
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH      = YES
-
-# If the CALL_GRAPH and HAVE_DOT options are set to YES then 
-# doxygen will generate a call dependency graph for every global function 
-# or class method. Note that enabling this option will significantly increase 
-# the time of a run. So in most cases it will be better to enable call graphs 
-# for selected functions only using the \callgraph command.
-
-CALL_GRAPH             = NO
-
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then 
-# doxygen will generate a caller dependency graph for every global function 
-# or class method. Note that enabling this option will significantly increase 
-# the time of a run. So in most cases it will be better to enable caller 
-# graphs for selected functions only using the \callergraph command.
-
-CALLER_GRAPH           = NO
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
-# will graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY    = YES
-
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
-# then doxygen will show the dependencies a directory has on other directories 
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH        = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
-# generated by dot. Possible values are png, jpg, or gif
-# If left blank png will be used.
-
-DOT_IMAGE_FORMAT       = png
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be 
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH               = 
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that 
-# contain dot files that are included in the documentation (see the 
-# \dotfile command).
-
-DOTFILE_DIRS           = 
-
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 
-# nodes that will be shown in the graph. If the number of nodes in a graph 
-# becomes larger than this value, doxygen will truncate the graph, which is 
-# visualized by representing a node as a red box. Note that doxygen if the 
-# number of direct children of the root node in a graph is already larger than 
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note 
-# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-
-DOT_GRAPH_MAX_NODES    = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 
-# graphs generated by dot. A depth value of 3 means that only nodes reachable 
-# from the root by following a path via at most 3 edges will be shown. Nodes 
-# that lay further from the root node will be omitted. Note that setting this 
-# option to 1 or 2 may greatly reduce the computation time needed for large 
-# code bases. Also note that the size of a graph can be further restricted by 
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-
-MAX_DOT_GRAPH_DEPTH    = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
-# background. This is enabled by default, which results in a transparent 
-# background. Warning: Depending on the platform used, enabling this option 
-# may lead to badly anti-aliased labels on the edges of a graph (i.e. they 
-# become hard to read).
-
-DOT_TRANSPARENT        = YES
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
-# files in one run (i.e. multiple -o and -T options on the command line). This 
-# makes dot run faster, but since only newer versions of dot (>1.8.10) 
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS      = NO
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
-# generate a legend page explaining the meaning of the various boxes and 
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND        = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
-# remove the intermediate dot files that are used to generate 
-# the various graphs.
-
-DOT_CLEANUP            = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine   
-#---------------------------------------------------------------------------
-
-# The SEARCHENGINE tag specifies whether or not a search engine should be 
-# used. If set to NO the values of all tags below this one will be ignored.
-
-SEARCHENGINE           = NO
diff --git a/etc/config/src/DEPENDENT_TEMPLATE.cpp b/etc/config/src/DEPENDENT_TEMPLATE.cpp
index d054214..de1663d 100644
--- a/etc/config/src/DEPENDENT_TEMPLATE.cpp
+++ b/etc/config/src/DEPENDENT_TEMPLATE.cpp
@@ -24,11 +24,6 @@
 
 #include "config.h"
 
-#ifdef _RWSTD_NO_TYPENAME
-
-#  define typename
-
-#endif
 
 template <class T>
 struct A
diff --git a/etc/config/src/EXTERN_MEMBER_TEMPLATE.cpp b/etc/config/src/EXTERN_MEMBER_TEMPLATE.cpp
index 0006d1a..8bd8fc7 100644
--- a/etc/config/src/EXTERN_MEMBER_TEMPLATE.cpp
+++ b/etc/config/src/EXTERN_MEMBER_TEMPLATE.cpp
@@ -24,13 +24,6 @@
 
 #include "config.h"
 
-// establish dependencies on the config tests and define config
-// macros used in the header below (the are not autodetected
-// in headers)
-#ifdef _RWSTD_NO_MEMBER_TEMPLATES
-#  define NO_MEMBER_TEMPLATES
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
-
 // include a file containing the definition of a template
 // and an extern template directive referencing an explicit
 // instantiation of the same template in extern_template_imp.o
diff --git a/etc/config/src/IMPLICIT_INCLUSION.cpp b/etc/config/src/IMPLICIT_INCLUSION.cpp
index 088096c..b8ce96c 100644
--- a/etc/config/src/IMPLICIT_INCLUSION.cpp
+++ b/etc/config/src/IMPLICIT_INCLUSION.cpp
@@ -30,8 +30,6 @@
 
     int result = si.foo ();
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
     // exercise implicit inclusion with member templates
     // to detect SunPro 5.7 bug #475
 
@@ -39,7 +37,5 @@
 
     result += sd.bar (result);
 
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
-
     return result;
 }
diff --git a/etc/config/src/INITIALIZER_LIST.cpp b/etc/config/src/INITIALIZER_LIST.cpp
new file mode 100644
index 0000000..6dee309
--- /dev/null
+++ b/etc/config/src/INITIALIZER_LIST.cpp
@@ -0,0 +1,14 @@
+// checking for std::initializer_list<T>
+
+#include <initializer_list>
+
+// see if the initializer_list feature is implemented
+int main ()
+{
+    std::initializer_list<int> il = { 1, 2, 3, 4 };
+
+    if (4 == il.size () && 1 == *il.begin () && 4 == *(il.end () - 1))
+        return 0;   // success
+
+    return 1;   // failure
+}
diff --git a/etc/config/src/MEMBER_TEMPLATES.cpp b/etc/config/src/MEMBER_TEMPLATES.cpp
deleted file mode 100644
index 873ffd5..0000000
--- a/etc/config/src/MEMBER_TEMPLATES.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-// checking for member templates
-
-/***************************************************************************
- *
- * 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 1999-2007 Rogue Wave Software, Inc.
- * 
- **************************************************************************/
-
-struct C
-{
-    template <class T>
-    struct CA;   // fully defined below
-
-    template <class T>
-    void foo (T);   // fully defined below
-};
-
-
-// verify that member templates may be defined outside
-// the body of the class of which they are a member
-template <class T>
-struct C::CA { };
-
-template <class T>
-void C::foo (T) { }
-
-
-template <class T>
-struct D
-{
-    template <class U>
-    struct DA;   // fully defined below
-
-    template <class U>
-    void foo (U);   // fully defined below
-};
-
-
-// verify that member templates may be defined outside
-// the body of the template of which they are a member
-template <class T>
-template <class U>
-struct D<T>::DA { };
-
-template <class T>
-template <class U>
-void D<T>::foo (U) { }
-
-
-// check that member templates are usable
-void bar (C c, C::CA<int> cca, D<int> d, D<char>::DA<int> dda)
-{
-    // all used types are complete
-    c.foo (cca);
-
-    // all used types are complete
-    d.foo (dda);
-}
diff --git a/etc/config/src/MEMBER_TEMPLATE_OVERLOAD.cpp b/etc/config/src/MEMBER_TEMPLATE_OVERLOAD.cpp
deleted file mode 100644
index 21a1bbc..0000000
--- a/etc/config/src/MEMBER_TEMPLATE_OVERLOAD.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-// checking for member template overloads on return type
-
-/***************************************************************************
- *
- * 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 1999-2007 Rogue Wave Software, Inc.
- * 
- **************************************************************************/
-
-template <class T, class U, class V>
-struct A { };
-
-template <class T>
-struct B { };
-
-template <class T>
-struct C { };
-
-int n;
-
-template <int N>
-struct D
-{
-    template <class T, class U, class V>
-    A<T, U, V>
-    foo (T = T ()) { ++n; return A<T, U, V>(); }
-
-    template <class T, class U>
-    A<T, U, C<T> >
-    foo (T t = T ()) { ++n; return foo<T, U, C<T> >(t); }
-
-    template <class T>
-    A<T, B<T>, C<T> >
-    foo (T t = T ()) { ++n; return foo<T, B<T> >(t); }
-
-    A<int, B<int>, C<int> >
-    foo (int i = int ()) { ++n; return foo<int>(i); }
-};
-
-int main ()
-{
-    D<0> d;
-
-    d.foo ();
-
-    return !(4 == n);
-}
diff --git a/etc/config/src/NONDEDUCED_CONTEXT.cpp b/etc/config/src/NONDEDUCED_CONTEXT.cpp
index 68c8d4f..4cfb7b0 100644
--- a/etc/config/src/NONDEDUCED_CONTEXT.cpp
+++ b/etc/config/src/NONDEDUCED_CONTEXT.cpp
@@ -24,10 +24,6 @@
 
 #include "config.h"
 
-#ifdef _RWSTD_NO_TYPENAME
-#  define typename
-#endif
-
 
 // T::I is not deducible directly, but can be
 // deduced if the T in const T* can (14.8.2.4, p3)
diff --git a/etc/config/src/STATIC_CONST_MEMBER_EXPR_CONST.cpp b/etc/config/src/STATIC_CONST_MEMBER_EXPR_CONST.cpp
index ba11fa8..0ef01c0 100644
--- a/etc/config/src/STATIC_CONST_MEMBER_EXPR_CONST.cpp
+++ b/etc/config/src/STATIC_CONST_MEMBER_EXPR_CONST.cpp
@@ -24,10 +24,6 @@
 
 #include "config.h"
 
-#ifdef _RWSTD_NO_TYPENAME
-#  define typename /* empty */
-#endif   // _RWSTD_NO_TYPENAME
-
 struct A { typedef int I; };
 
 template <class T>
diff --git a/etc/config/src/TYPENAME.cpp b/etc/config/src/TYPENAME.cpp
deleted file mode 100644
index 665a2ad..0000000
--- a/etc/config/src/TYPENAME.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-// checking the typename keyword
-
-/***************************************************************************
- *
- * 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 1999-2007 Rogue Wave Software, Inc.
- * 
- **************************************************************************/
-
-struct A
-{
-    typedef int I;
-};
-
-
-template <class T>
-struct B
-{
-    typedef typename T::I I;
-    typedef const T*      J;
-
-    I foo (I) const;
-    J bar (J) const;
-};
-
-
-template <class T>
-typename B<T>::I B<T>::foo (typename B<T>::I i) const
-{
-    return i;
-}
-
-
-template <class T>
-typename B<T>::J B<T>::bar (J j) const
-{
-    return j;
-}
-
-
-int foobar ()
-{
-    B<A> b;
-
-    // instantiate B and its members
-    return b.foo (0) + !b.bar (0);
-}
diff --git a/etc/config/src/extern_template_imp.cpp b/etc/config/src/extern_template_imp.cpp
index 481072b..5d37080 100644
--- a/etc/config/src/extern_template_imp.cpp
+++ b/etc/config/src/extern_template_imp.cpp
@@ -23,13 +23,6 @@
 
 #include "config.h"
 
-// establish dependencies on the config tests and define config
-// macros used in the header below (the are not autodetected
-// in headers)
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-#  define NO_MEMBER_TEMPLATES
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
-
 // explicitly instantiate the template defined in the header
 #define INSTANTIATE
 #include "extern_template_imp.h"
diff --git a/etc/config/src/extern_template_imp.h b/etc/config/src/extern_template_imp.h
index a0e4e05..568fbe7 100644
--- a/etc/config/src/extern_template_imp.h
+++ b/etc/config/src/extern_template_imp.h
@@ -47,18 +47,6 @@
         return bar ();
     }
 
-#if defined (NO_MEMBER_TEMPLATES)
-
-    int inline_member_template (int) const {
-        return 0;
-    }
-
-    int member_template (int) const {
-        return 0;
-    }
-
-#else   // if !defined (NO_MEMBER_TEMPLATES)
-
     template <class U>
     U inline_member_template (U) const {
         return U ();
@@ -66,9 +54,6 @@
 
     template <class U>
     U member_template (U) const;
-
-#endif   // NO_MEMBER_TEMPLATES
-
 };
 
 template <class T>
@@ -87,8 +72,6 @@
 #endif   // INSTANTIATE
 }
 
-#if !defined (NO_MEMBER_TEMPLATES)
-
 template <class T>
 template <class U>
 U S<T>::member_template (U) const
@@ -96,8 +79,6 @@
     return U ();
 }
 
-#endif   // NO_MEMBER_TEMPLATES
-
 
 #if defined (INSTANTIATE)
 
diff --git a/etc/config/src/implicit_inclusion_imp.cc b/etc/config/src/implicit_inclusion_imp.cc
index 2644145..fb1f422 100644
--- a/etc/config/src/implicit_inclusion_imp.cc
+++ b/etc/config/src/implicit_inclusion_imp.cc
@@ -28,13 +28,9 @@
     return T ();
 }
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
 template <class T>
 template <class U>
 U S<T>::bar (U u)
 {
     return u;
 }
-
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
diff --git a/etc/config/src/implicit_inclusion_imp.h b/etc/config/src/implicit_inclusion_imp.h
index c39e189..e51679e 100644
--- a/etc/config/src/implicit_inclusion_imp.h
+++ b/etc/config/src/implicit_inclusion_imp.h
@@ -26,13 +26,8 @@
 {
     T foo ();
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
     template <class U>
     U bar (U);
-
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
-
 };
 
 // the file containing the definitions of S<T>::foo() and S<T>::bar(),
diff --git a/examples/include/examples.h b/examples/include/examples.h
index 46a92c4..b02bbe0 100644
--- a/examples/include/examples.h
+++ b/examples/include/examples.h
@@ -39,11 +39,6 @@
 #endif   // _RWSTD_NO_NAMESPACE
 
 
-#ifdef _RWSTD_NO_TYPENAME
-# define typename
-#endif   // _RWSTD_NO_TYPENAME
-
-
 #ifdef _RWSTD_NO_FOR_LOCAL_SCOPE
 #  define for if (0) ; else for
 #endif   // _RWSTD_NO_FOR_LOCAL_SCOPE
diff --git a/examples/include/stocks.h b/examples/include/stocks.h
index a556fdf..3a4816b 100644
--- a/examples/include/stocks.h
+++ b/examples/include/stocks.h
@@ -153,12 +153,6 @@
 
    friend StockXchange::outStream&
    operator<< (StockXchange::outStream&, const StockXchange&);
- 
-private: 
-
-#ifdef _RWSTD_NO_MEMBER_TEMPLATES
-   std::locale::id &_C_get_id () const { return id; }
-#endif
 };
 
 
diff --git a/include/algorithm b/include/algorithm
index 084d634..154ca4f 100644
--- a/include/algorithm
+++ b/include/algorithm
@@ -177,12 +177,12 @@
 // 25.1.6 - Count [lib.alg.count]
 
 template <class _InputIter, class _TypeT>
-inline _TYPENAME iterator_traits<_InputIter>::difference_type
+inline typename iterator_traits<_InputIter>::difference_type
 count (_InputIter __first, _InputIter __last, const _TypeT &__val)
 {
     _RWSTD_ASSERT_RANGE (__first, __last);
 
-    _TYPENAME iterator_traits<_InputIter>::difference_type __n = 0;
+    typename iterator_traits<_InputIter>::difference_type __n = 0;
     for ( ; !(__first == __last); ++__first)
         if (*__first == __val)
             ++__n;
@@ -191,12 +191,12 @@
 
 
 template <class _InputIter, class _Predicate>
-inline _TYPENAME iterator_traits<_InputIter>::difference_type
+inline typename iterator_traits<_InputIter>::difference_type
 count_if (_InputIter __first, _InputIter __last, _Predicate __pred)
 {
     _RWSTD_ASSERT_RANGE (__first, __last);
 
-    _TYPENAME iterator_traits<_InputIter>::difference_type __n = 0;
+    typename iterator_traits<_InputIter>::difference_type __n = 0;
     for ( ; !(__first == __last); ++__first)
         if (!(__pred (*__first) == false))
             ++__n;
diff --git a/include/algorithm.cc b/include/algorithm.cc
index cfd0ddb..8e0df99 100644
--- a/include/algorithm.cc
+++ b/include/algorithm.cc
@@ -596,7 +596,7 @@
     if (!(__first == __last)) {
 
 #ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC
-        typedef _TYPENAME
+        typedef typename
             iterator_traits<_RandomAccessIter>::difference_type _DiffT;
 #else   // if defined (_RWSTD_NO_CLASS_PARTIAL_SPEC)
         typedef _RWSTD_PTRDIFF_T _DiffT;
diff --git a/include/array b/include/array
index a6a7dbb..8b70fab 100644
--- a/include/array
+++ b/include/array
@@ -213,7 +213,7 @@
 
 
 template <class _TypeT, _RWSTD_SIZE_T _Size>
-inline _TYPENAME array<_TypeT, _Size>::reference
+inline typename array<_TypeT, _Size>::reference
 array<_TypeT, _Size>::
 operator[] (size_type __inx)
 {
@@ -231,7 +231,7 @@
   
 
 template <class _TypeT, _RWSTD_SIZE_T _Size>
-inline _TYPENAME array<_TypeT, _Size>::const_reference
+inline typename array<_TypeT, _Size>::const_reference
 array<_TypeT, _Size>::
 operator[] (size_type __inx) const
 {
@@ -249,7 +249,7 @@
   
 
 template <class _TypeT, _RWSTD_SIZE_T _Size>
-inline _TYPENAME array<_TypeT, _Size>::reference
+inline typename array<_TypeT, _Size>::reference
 array<_TypeT, _Size>::
 at (size_type __inx)
 {
@@ -263,7 +263,7 @@
     
 
 template <class _TypeT, _RWSTD_SIZE_T _Size>
-inline _TYPENAME array<_TypeT, _Size>::const_reference
+inline typename array<_TypeT, _Size>::const_reference
 array<_TypeT, _Size>::
 at (size_type __inx)  const
 {
diff --git a/include/bitset b/include/bitset
index 9054d15..60ede54 100644
--- a/include/bitset
+++ b/include/bitset
@@ -167,11 +167,11 @@
 
     // 23.3.5.1, p3
     template <class _CharT, class _Traits, class _Allocator>
-    _EXPLICIT
+    explicit
     bitset (const basic_string<_CharT, _Traits, _Allocator> &__str,
-            _TYPENAME basic_string<_CharT, _Traits,
+            typename basic_string<_CharT, _Traits,
                                    _Allocator>::size_type __pos = 0,
-            _TYPENAME basic_string<_CharT, _Traits,
+            typename basic_string<_CharT, _Traits,
                                    _Allocator>::size_type __n =
                                        _RWSTD_SIZE_MAX,
             _CharT __b0 = '0', _CharT __b1 = '1') {
@@ -187,7 +187,7 @@
 
     // 23.3.5.1, p3
     template <class _CharT, class _Traits, class _Allocator>
-    _EXPLICIT
+    explicit
     bitset (const basic_string<_CharT, _Traits, _Allocator> &__str,
             _RWSTD_SIZE_T __pos = 0, _RWSTD_SIZE_T __n = _RWSTD_SIZE_MAX,
             _CharT __b0 = '0', _CharT __b1 = '1') {
@@ -201,10 +201,9 @@
 
 
 #ifndef _RWSTD_NO_EXT_BITSET_CTOR_STRING
-#  ifndef _RWSTD_NO_MEMBER_TEMPLATE_OVERLOAD
 
     // extension
-    _EXPLICIT
+    explicit
     bitset (const string &__str,
             _RWSTD_SIZE_T __pos = 0, _RWSTD_SIZE_T __n = _RWSTD_SIZE_MAX,
             char __b0 = '0', char __b1 = '1') {
@@ -214,10 +213,10 @@
                                    "size_t, size_t)"));
     }
 
-#    ifndef _RWSTD_NO_WCHAR_T
+#  ifndef _RWSTD_NO_WCHAR_T
 
     // extension
-    _EXPLICIT
+    explicit
     bitset (const wstring &__str,
             _RWSTD_SIZE_T __pos = 0, _RWSTD_SIZE_T __n = _RWSTD_SIZE_MAX,
             wchar_t __b0 = L'0', wchar_t __b1 = L'1') {
@@ -227,15 +226,14 @@
                                    "size_t, size_t)"));
     }
 
-#    endif   // _RWSTD_NO_WCHAR_T
-#  endif   // _RWSTD_NO_MEMBER_TEMPLATE_OVERLOAD
+#  endif   // _RWSTD_NO_WCHAR_T
 #endif   // _RWSTD_NO_EXT_BITSET_CTOR_STRING
 
 
 #ifndef _RWSTD_NO_EXT_BITSET_CTOR_CHAR_ARRAY
 
     // extension
-    _EXPLICIT
+    explicit
     bitset (const char *__str,
             _RWSTD_SIZE_T __pos = 0, _RWSTD_SIZE_T __n = _RWSTD_SIZE_MAX,
             char __b0 = '0', char __b1 = '1') {
@@ -248,7 +246,7 @@
 #  ifndef _RWSTD_NO_WCHAR_T
 
     // extension
-    _EXPLICIT
+    explicit
     bitset (const wchar_t *__str,
             _RWSTD_SIZE_T __pos = 0, _RWSTD_SIZE_T __n = _RWSTD_SIZE_MAX,
             wchar_t __b0 = L'0', wchar_t __b1 = L'1') {
@@ -264,7 +262,7 @@
     // uses char_traits<CharT>::length() to compute the length of the string
     // and char_traits<CharT>::eq() to compare characters with `b0' and `b1'
     template <class _CharT>
-    _EXPLICIT
+    explicit
     bitset (const _CharT *__str,
             _RWSTD_SIZE_T __pos = 0, _RWSTD_SIZE_T __n = _RWSTD_SIZE_MAX,
             _CharT __b0 = '0', _CharT __b1 = '1') {
@@ -374,9 +372,7 @@
     // 23.3.5.2, p31
     unsigned long to_ulong () const;
 
-#if    !defined (_RWSTD_NO_MEMBER_TEMPLATES) \
-    && !defined (_RWSTD_NO_TEMPLATE_ON_RETURN_TYPE) \
-    && !defined (_RWSTD_NO_MEMBER_TEMPLATE_OVERLOAD)
+#if !defined (_RWSTD_NO_TEMPLATE_ON_RETURN_TYPE)
 
     // 23.3.5.2, p33
     template <class _CharT, class _Traits, class _Allocator>
@@ -410,14 +406,14 @@
 
 #  endif   // !_NO_EXT_BITSET_TO_STRING
 
-#else   // if _MEMBER_TEMPLATES || _NO_TEMPLATE_ON_RETURN_TYPE || ...
+#else   // if _NO_TEMPLATE_ON_RETURN_TYPE
 
     // 23.3.5.2, p33
     string to_string (char = '0', char = '1') const;
 
 # define _RWSTD_BITSET_TO_STRING(ign1, ign2)  to_string ()
 
-#endif   // !_NO_MEMBER_TEMPLATES && !_NO_TEMPLATE_ON_RETURN_TYPE && ...
+#endif   // !_NO_TEMPLATE_ON_RETURN_TYPE
 
     // 23.3.5.2, p35
     _RWSTD_SIZE_T count () const _THROWS (()) {
@@ -563,9 +559,7 @@
 }
 
 
-#if    !defined (_RWSTD_NO_MEMBER_TEMPLATES) \
-    && !defined (_RWSTD_NO_TEMPLATE_ON_RETURN_TYPE) \
-    && !defined (_RWSTD_NO_MEMBER_TEMPLATE_OVERLOAD)
+#if !defined (_RWSTD_NO_TEMPLATE_ON_RETURN_TYPE)
 
 // 23.3.5.2, p33
 template <_RWSTD_SIZE_T _Size>
@@ -583,7 +577,7 @@
     return __s;
 }
 
-#else   // _NO_MEMBER_TEMPLATES || _NO_TEMPLATE_ON_RETURN_TYPE ...
+#else   // _NO_TEMPLATE_ON_RETURN_TYPE
 
 // 23.3.5.2, p33
 template <_RWSTD_SIZE_T _Size>
@@ -600,7 +594,7 @@
     return __s;
 }
 
-#endif   // !_NO_MEMBER_TEMPLATES && !_NO_TEMPLATE_ON_RETURN_TYPE ...
+#endif   // !_NO_TEMPLATE_ON_RETURN_TYPE
 
 
 // 23.3.5.3, p1
diff --git a/include/bitset.cc b/include/bitset.cc
index d9ec11d..07dceb0 100644
--- a/include/bitset.cc
+++ b/include/bitset.cc
@@ -127,7 +127,7 @@
 {
     typedef _STD::basic_istream<_CharT, _Traits> _Istream;
 
-    _TYPENAME _Istream::iostate __err (__strm.goodbit);
+    typename _Istream::iostate __err (__strm.goodbit);
 
 
     _STD::bitset<_Size> __tmp;
@@ -137,14 +137,14 @@
     _TRY {
 
         // sentry may throw an exception
-        const _TYPENAME _Istream::sentry __ipfx (__strm);
+        const typename _Istream::sentry __ipfx (__strm);
 
         if (__ipfx) {
 
             // 23.3.5.3, p5 - extract at most _Size chars
 
             // get next char without extracting
-            _TYPENAME _Traits::int_type __c = __strm.rdbuf ()->sgetc ();
+            typename _Traits::int_type __c = __strm.rdbuf ()->sgetc ();
 
             for ( ; __bit; --__bit) {
 
diff --git a/include/complex b/include/complex
index 117259e..e1dfa56 100644
--- a/include/complex
+++ b/include/complex
@@ -98,19 +98,6 @@
 }
 
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-#  define _RWSTD_MEMBER_TEMPLATE(name)  \
-          template <class _TypeX>       \
-          complex<value_type>& name (const complex<_TypeX> &__rhs)
-
-#else   // if defined (_RWSTD_NO_MEMBER_TEMPLATES)
-
-#  define _RWSTD_MEMBER_TEMPLATE(name)     \
-          complex<value_type>& name (const complex &__rhs)
-
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
-
-
 // 26.2.3 - complex specializations
 
 _RWSTD_SPECIALIZED_CLASS
@@ -124,12 +111,12 @@
       : _C_re (__re), _C_im (__im) { }
 
     // defined after the definition of the incomplete complex<double>
-    _EXPLICIT complex (const complex<double>&);
+    explicit complex (const complex<double>&);
     
 #ifndef _RWSTD_NO_LONG_DOUBLE
 
     // defined after the definition of the incomplete complex<long double>
-    _EXPLICIT complex (const complex<long double>&);
+    explicit complex (const complex<long double>&);
 
 #endif   // _RWSTD_NO_LONG_DOUBLE
 
@@ -150,28 +137,28 @@
 
 #endif   // _COMPILER_VERSION <= 730
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATE
-
     template <class _TypeT>
     complex& operator= (const complex<_TypeT>& __rhs) {
         return (_C_re = __rhs.real ()), (_C_im = __rhs.imag ()), *this;
     }
 
-#endif   // _RWSTD_NO_MEMBER_TEMPLATE
-    
-    _RWSTD_MEMBER_TEMPLATE (operator+=) {
+    template <class _TypeX>
+    complex<value_type>& operator+= (const complex<_TypeX> &__rhs) {
         return (_C_re += __rhs.real ()), (_C_im += __rhs.imag ()), *this;
     }
 
-    _RWSTD_MEMBER_TEMPLATE (operator-=) {
+    template <class _TypeX>
+    complex<value_type>& operator-= (const complex<_TypeX> &__rhs) {
         return (_C_re -= __rhs.real ()), (_C_im -= __rhs.imag ()), *this;
     }
 
-    _RWSTD_MEMBER_TEMPLATE (operator*=) {
+    template <class _TypeX>
+    complex<value_type>& operator*= (const complex<_TypeX> &__rhs) {
         return *this = *this * complex<value_type>(__rhs);
     }
 
-    _RWSTD_MEMBER_TEMPLATE (operator/=) {
+    template <class _TypeX>
+    complex<value_type>& operator/= (const complex<_TypeX> &__rhs) {
         return *this = *this / complex<value_type>(__rhs);
     }
 
@@ -217,7 +204,7 @@
 #ifndef _RWSTD_NO_LONG_DOUBLE
 
     // defined after the definition of the incomplete complex<long double>
-    _EXPLICIT complex (const complex<long double>&);
+    explicit complex (const complex<long double>&);
 
 #endif   // _RWSTD_NO_LONG_DOUBLE
 
@@ -238,28 +225,28 @@
 
 #endif   // _COMPILER_VERSION <= 730
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATE
-
     template <class _TypeT>
     complex& operator= (const complex<_TypeT>& __rhs) {
         return (_C_re = __rhs.real ()), (_C_im = __rhs.imag ()), *this;
     }
 
-#endif   // _RWSTD_NO_MEMBER_TEMPLATE
-    
-    _RWSTD_MEMBER_TEMPLATE (operator+=) {
+    template <class _TypeX>
+    complex<value_type>& operator+= (const complex<_TypeX> &__rhs) {
         return (_C_re += __rhs.real ()), (_C_im += __rhs.imag ()), *this;
     }
 
-    _RWSTD_MEMBER_TEMPLATE (operator-=) {
+    template <class _TypeX>
+    complex<value_type>& operator-= (const complex<_TypeX> &__rhs) {
         return (_C_re -= __rhs.real ()), (_C_im -= __rhs.imag ()), *this;
     }
 
-    _RWSTD_MEMBER_TEMPLATE (operator*=) {
+    template <class _TypeX>
+    complex<value_type>& operator*= (const complex<_TypeX> &__rhs) {
         return *this = *this * complex<value_type>(__rhs);
     }
 
-    _RWSTD_MEMBER_TEMPLATE (operator/=) {
+    template <class _TypeX>
+    complex<value_type>& operator/= (const complex<_TypeX> &__rhs) {
         return *this = *this / complex<value_type>(__rhs);
     }
 
@@ -316,19 +303,23 @@
         return _C_re;
     }
 
-    _RWSTD_MEMBER_TEMPLATE (operator+=) {
+    template <class _TypeX>
+    complex<value_type>& operator+= (const complex<_TypeX> &__rhs) {
         return (_C_re += __rhs.real ()), (_C_im += __rhs.imag ()), *this;
     }
 
-    _RWSTD_MEMBER_TEMPLATE (operator-=) {
+    template <class _TypeX>
+    complex<value_type>& operator-= (const complex<_TypeX> &__rhs) {
         return (_C_re -= __rhs.real ()), (_C_im -= __rhs.imag ()), *this;
     }
 
-    _RWSTD_MEMBER_TEMPLATE (operator*=) {
+    template <class _TypeX>
+    complex<value_type>& operator*= (const complex<_TypeX> &__rhs) {
         return *this = *this * complex<value_type>(__rhs);
     }
 
-    _RWSTD_MEMBER_TEMPLATE (operator/=) {
+    template <class _TypeX>
+    complex<value_type>& operator/= (const complex<_TypeX> &__rhs) {
         return *this = *this / complex<value_type>(__rhs);
     }
 
@@ -341,15 +332,11 @@
 
 #endif   // _COMPILER_VERSION <= 730
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATE
-
     template <class _TypeT>
     complex& operator= (const complex<_TypeT>& __rhs) {
         return (_C_re = __rhs.real ()), (_C_im = __rhs.imag ()), *this;
     }
 
-#endif   // _RWSTD_NO_MEMBER_TEMPLATE
-
     complex& operator+= (value_type __rhs) {
         return _C_re += __rhs, *this;
     }
@@ -414,8 +401,6 @@
         return _C_re;
     }
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATE
-
     template <class _TypeU>
     complex (const complex<_TypeU>& __rhs)
         : _C_re (_RWSTD_STATIC_CAST (value_type, __rhs.real ())),
@@ -427,21 +412,23 @@
         return *this = complex (__rhs);
     }
 
-#endif   // _RWSTD_NO_MEMBER_TEMPLATE
-    
-    _RWSTD_MEMBER_TEMPLATE (operator+=) {
+    template <class _TypeX>
+    complex<value_type>& operator+= (const complex<_TypeX> &__rhs) {
         return *this = *this + __rhs;
     }
 
-    _RWSTD_MEMBER_TEMPLATE (operator-=) {
+    template <class _TypeX>
+    complex<value_type>& operator-= (const complex<_TypeX> &__rhs) {
         return *this = *this - __rhs;
     }
 
-    _RWSTD_MEMBER_TEMPLATE (operator*=) {
+    template <class _TypeX>
+    complex<value_type>& operator*= (const complex<_TypeX> &__rhs) {
         return *this = *this * __rhs;
     }
 
-    _RWSTD_MEMBER_TEMPLATE (operator/=) {
+    template <class _TypeX>
+    complex<value_type>& operator/= (const complex<_TypeX> &__rhs) {
         return *this = *this / __rhs;
     }
 
diff --git a/include/deque b/include/deque
index 210cb2f..ad6c960 100644
--- a/include/deque
+++ b/include/deque
@@ -58,8 +58,6 @@
 template <class _TypeT, class _Allocator = allocator<_TypeT> >
 class deque;
 
-#ifdef _RWSTD_NO_MEMBER_TEMPLATES
-
 // declarations of non-member function templates implementing
 // the functionality of deque member function templates
 
@@ -83,8 +81,6 @@
 void __rw_insert_range (deque<_TypeT, _Allocator>*, _DequeIter,
                         _BidirIter, _BidirIter, bidirectional_iterator_tag);
 
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
-
 
 template <class _TypeT, class _DiffT, class _Pointer,
           class _Reference, class _Allocator>
@@ -97,11 +93,11 @@
 public:
 
     typedef _Allocator                               allocator_type;
-    typedef _TYPENAME allocator_type::size_type      size_type;
-    typedef _TYPENAME _C_iter_base::value_type       value_type;
-    typedef _TYPENAME _C_iter_base::difference_type  difference_type;
-    typedef _TYPENAME _C_iter_base::pointer          pointer;
-    typedef _TYPENAME _C_iter_base::reference        reference;
+    typedef typename allocator_type::size_type      size_type;
+    typedef typename _C_iter_base::value_type       value_type;
+    typedef typename _C_iter_base::difference_type  difference_type;
+    typedef typename _C_iter_base::pointer          pointer;
+    typedef typename _C_iter_base::reference        reference;
 
     typedef random_access_iterator_tag               iterator_category;
     
@@ -110,7 +106,7 @@
     _C_mutable_iter;
 
     typedef _RWSTD_REBIND (allocator_type, value_type*) _C_node_alloc_type;
-    typedef _TYPENAME _C_node_alloc_type::pointer       _C_node_pointer;
+    typedef typename _C_node_alloc_type::pointer       _C_node_pointer;
 
     
     static size_type _C_bufsize () {
@@ -277,8 +273,8 @@
 operator- (const _RWSTD_DEQUE_ITER(1) &__x, const _RWSTD_DEQUE_ITER(2) &__y)
 {
     // _RWSTD_ASSERT_RANGE (__x, __y);
-    typedef _TYPENAME _RWSTD_DEQUE_ITER(1)::pointer _Pointer1;
-    typedef _TYPENAME _RWSTD_DEQUE_ITER(2)::pointer _Pointer2;
+    typedef typename _RWSTD_DEQUE_ITER(1)::pointer _Pointer1;
+    typedef typename _RWSTD_DEQUE_ITER(2)::pointer _Pointer2;
 
     if (_Pointer1 () == __x._C_cur && _Pointer2 () == __y._C_cur) {
         // __x and __y are end-iterator's of the empty deque's
@@ -356,12 +352,12 @@
 
     typedef _TypeT                                    value_type;
     typedef _Allocator                                allocator_type;
-    typedef _TYPENAME allocator_type::size_type       size_type;
-    typedef _TYPENAME allocator_type::difference_type difference_type;
-    typedef _TYPENAME allocator_type::pointer         pointer;
-    typedef _TYPENAME allocator_type::const_pointer   const_pointer;
-    typedef _TYPENAME allocator_type::reference       reference;
-    typedef _TYPENAME allocator_type::const_reference const_reference;
+    typedef typename allocator_type::size_type       size_type;
+    typedef typename allocator_type::difference_type difference_type;
+    typedef typename allocator_type::pointer         pointer;
+    typedef typename allocator_type::const_pointer   const_pointer;
+    typedef typename allocator_type::reference       reference;
+    typedef typename allocator_type::const_reference const_reference;
 
     typedef _RWSTD_ALLOC_TYPE (allocator_type, value_type) _C_value_alloc_type;
 
@@ -374,7 +370,7 @@
 
     typedef _RWSTD_REBIND (allocator_type, value_type*) _C_node_alloc_type;
 
-    typedef _TYPENAME _C_node_alloc_type::pointer       _C_node_pointer;
+    typedef typename _C_node_alloc_type::pointer       _C_node_pointer;
 
 #ifndef _RWSTD_NO_DEBUG_ITER
 
@@ -434,13 +430,13 @@
 
 #endif   // _RWSTD_NO_CLASS_PARTIAL_SPEC 
 
-    _EXPLICIT
+    explicit
     deque (const allocator_type &__alloc = allocator_type ())
       : allocator_type (__alloc) {
         _C_init ();
     }
 
-    _EXPLICIT
+    explicit
     deque (size_type __n, const_reference __x = value_type (), 
            const allocator_type &__alloc = allocator_type ())
         : allocator_type (__alloc) {
@@ -695,8 +691,6 @@
     // implements insert with repetition
     void _C_insert_n (const iterator&, size_type, const_reference);
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
     // implements range insert for BidirectionalIterators
     template <class _BidirIter>
     void _C_insert_range (iterator, _BidirIter, _BidirIter,
@@ -707,12 +701,6 @@
     void _C_insert_range (iterator, _InputIter, _InputIter,
                           input_iterator_tag);
 
-#else   // if defined (_RWSTD_NO_MEMBER_TEMPLATES)
-
-public:
-
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
-
     // implements range assign
     template <class _InputIter>
     void _C_assign (_InputIter __first, _InputIter __last, void*) {
diff --git a/include/deque.cc b/include/deque.cc
index 8b6fcd3..f809ae1 100644
--- a/include/deque.cc
+++ b/include/deque.cc
@@ -67,7 +67,7 @@
 
 
 template <class _TypeT, class _Allocator>
-_TYPENAME deque<_TypeT, _Allocator>::iterator 
+typename deque<_TypeT, _Allocator>::iterator 
 deque<_TypeT, _Allocator>::
 insert (iterator __it, const_reference __x)
 {
@@ -108,7 +108,7 @@
 
 
 template <class _TypeT, class _Allocator>
-_TYPENAME deque<_TypeT, _Allocator>::iterator 
+typename deque<_TypeT, _Allocator>::iterator 
 deque<_TypeT, _Allocator>::
 erase (iterator __it)
 {
@@ -138,7 +138,7 @@
     
 
 template <class _TypeT, class _Allocator>
-_TYPENAME deque<_TypeT, _Allocator>::iterator 
+typename deque<_TypeT, _Allocator>::iterator 
 deque<_TypeT, _Allocator>::
 erase (iterator __first, iterator __last)
 {
@@ -518,8 +518,6 @@
 }
 
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
 template <class _TypeT, class _Allocator>
 template <class _InputIter>
 void deque<_TypeT, _Allocator>::
@@ -529,18 +527,6 @@
 
     deque* const __self = this;
 
-#else   // if defined (_RWSTD_NO_MEMBER_TEMPLATES)
-
-template <class _TypeT, class _Allocator, class _InputIter>
-void
-__rw_assign_range (deque<_TypeT, _Allocator> *__self,
-                   _InputIter __first, _InputIter __last, input_iterator_tag)
-{
-    typedef deque<_TypeT, _Allocator> _Deque;
-    typedef _TYPENAME _Deque::iterator iterator;
-    
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
-
     _RWSTD_ASSERT_RANGE (__first, __last);
     _RWSTD_ASSERT (__self->_C_is_valid ());
 
@@ -586,8 +572,6 @@
 }
 
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
 template<class _TypeT, class _Allocator>
 template <class _InputIter>
 void deque<_TypeT, _Allocator>::
@@ -599,17 +583,6 @@
 
     _Deque* const __self = this;
 
-#else   // if defined (_RWSTD_NO_MEMBER_TEMPLATES)
-
-template <class _TypeT, class _Allocator, class _DequeIter, class _InputIter>
-void
-__rw_insert_range (deque<_TypeT, _Allocator> *__self, _DequeIter __it,
-                   _InputIter __first, _InputIter __last, input_iterator_tag)
-{
-    typedef deque<_TypeT, _Allocator> _Deque;
-
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
-
     _RWSTD_ASSERT_RANGE (__it, __self->end ());
     _RWSTD_ASSERT_RANGE (__first, __last);
 
@@ -640,8 +613,6 @@
 }
 
 
-// #ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
 // template<class _TypeT, class _Allocator>
 // template <class _FwdIter>
 // void deque<_TypeT, _Allocator>::
@@ -653,24 +624,11 @@
 
 //     _Deque* const __self = this;
 
-// #else   // if defined (_RWSTD_NO_MEMBER_TEMPLATES)
-
-// template <class _TypeT, class _Allocator, class _DequeIter, class _FwdIter>
-// void
-// __rw_insert_range (deque<_TypeT, _Allocator> *__self, _DequeIter __it,
-//                    _FwdIter __first, _FwdIter __last, forward_iterator_tag)
-// {
-//     typedef deque<_TypeT, _Allocator> _Deque;
-
-// #endif   // _RWSTD_NO_MEMBER_TEMPLATES
-
 //     // implemented in terms of the Input Iterator overload
 //     _RWSTD_INSERT_RANGE (__it, __first, __last, input_iterator_tag ());
 // }
 
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
 template <class _TypeT, class _Allocator>
 template <class _BidirIter>
 void deque<_TypeT, _Allocator>::
@@ -682,22 +640,6 @@
 
     _Deque* const __self = this;
 
-#else   // if defined (_RWSTD_NO_MEMBER_TEMPLATES)
-
-template <class _TypeT, class _Allocator, class _DequeIter, class _BidirIter>
-void
-__rw_insert_range (deque<_TypeT, _Allocator> *__self, _DequeIter __it,
-                   _BidirIter __first, _BidirIter __last,
-                   bidirectional_iterator_tag)
-
-{
-    typedef deque<_TypeT, _Allocator>         _Deque;
-    typedef _TYPENAME _Deque::difference_type difference_type;
-    typedef _TYPENAME _Deque::size_type       size_type;
-    typedef _TYPENAME _Deque::iterator        iterator;
-
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
-
     _RWSTD_ASSERT_RANGE (__self->begin (), __it);
     _RWSTD_ASSERT_RANGE (__first, __last);
     _RWSTD_ASSERT (__self->_C_is_valid ());
diff --git a/include/fstream b/include/fstream
index a63d2e62..d351370 100644
--- a/include/fstream
+++ b/include/fstream
@@ -99,9 +99,9 @@
 public:
     typedef _CharT                          char_type;
     typedef _Traits                         traits_type;
-    typedef _TYPENAME traits_type::int_type int_type;
-    typedef _TYPENAME traits_type::pos_type pos_type;
-    typedef _TYPENAME traits_type::off_type off_type;
+    typedef typename traits_type::int_type int_type;
+    typedef typename traits_type::pos_type pos_type;
+    typedef typename traits_type::off_type off_type;
 
     // 27.8.1.2, p1
     basic_filebuf ()
@@ -128,7 +128,7 @@
     // ctor extensions - associate this with an open file and
     // optionally set buffer size and caller-allocated buffer
     // NOTE: passed in buffer will NOT be deallocated
-    _EXPLICIT
+    explicit
     basic_filebuf (int __fd, char_type* __buf   = 0,
                    _RWSTD_STREAMSIZE __bufsz = _RWSTD_DEFAULT_BUFSIZE)
         : _Streambuf (ios_base::openmode (_RW::__rw_fdmode (__fd))),
@@ -145,7 +145,7 @@
 
 #  ifdef stdin
 
-    _EXPLICIT
+    explicit
     basic_filebuf (FILE *__fptr, char_type* __buf = 0,
                    _RWSTD_STREAMSIZE __bufsz = _RWSTD_DEFAULT_BUFSIZE)
         : _Streambuf (),
@@ -292,7 +292,7 @@
 
 
 template<class _CharT, class _Traits>
-inline _TYPENAME basic_filebuf<_CharT, _Traits>::off_type
+inline typename basic_filebuf<_CharT, _Traits>::off_type
 basic_filebuf<_CharT, _Traits>::
 _C_crlf_extern_count (const char* __start, const char* __finish) const
 {
@@ -324,7 +324,7 @@
 
 
 template<class _CharT, class _Traits>
-inline _TYPENAME basic_filebuf<_CharT, _Traits>::off_type
+inline typename basic_filebuf<_CharT, _Traits>::off_type
 basic_filebuf<_CharT, _Traits>::
 _C_crlf_intern_count (const char_type* __start,
                       const char_type* __finish) const
@@ -364,9 +364,9 @@
 
     typedef _CharT                          char_type;
     typedef _Traits                         traits_type;
-    typedef _TYPENAME traits_type::int_type int_type;
-    typedef _TYPENAME traits_type::pos_type pos_type;
-    typedef _TYPENAME traits_type::off_type off_type;
+    typedef typename traits_type::int_type int_type;
+    typedef typename traits_type::pos_type pos_type;
+    typedef typename traits_type::off_type off_type;
 
     // NOTE: the ctors below pass the address of an unitialized
     //       member variable, _C_filebuf, to a base class ctor
@@ -376,7 +376,7 @@
     basic_ifstream ()
         : basic_istream<char_type, traits_type> (rdbuf ()) { }
 
-    _EXPLICIT
+    explicit
     basic_ifstream (const char        *__name,
                     ios_base::openmode __mode = ios_base::in,
                     long               __prot = 0666)
@@ -387,7 +387,7 @@
 #ifndef  _RWSTD_NO_EXT_FILEBUF
 
     // extensions - associate this with an open file and set buffer
-    _EXPLICIT
+    explicit
     basic_ifstream (int __fd, char_type *__buf = 0,
                     _RWSTD_STREAMSIZE __n = _RWSTD_DEFAULT_BUFSIZE)
         : basic_istream<char_type, traits_type> (rdbuf ()) {
@@ -396,7 +396,7 @@
 
 #  ifdef stdin
 
-    _EXPLICIT
+    explicit
     basic_ifstream (FILE *__fptr, char_type *__buf = 0,
                     _RWSTD_STREAMSIZE __n = _RWSTD_DEFAULT_BUFSIZE)
         : basic_istream<char_type, traits_type> (rdbuf ()) {
@@ -465,9 +465,9 @@
 
     typedef _CharT                          char_type;
     typedef _Traits                         traits_type;
-    typedef _TYPENAME traits_type::int_type int_type;
-    typedef _TYPENAME traits_type::pos_type pos_type;
-    typedef _TYPENAME traits_type::off_type off_type;
+    typedef typename traits_type::int_type int_type;
+    typedef typename traits_type::pos_type pos_type;
+    typedef typename traits_type::off_type off_type;
 
     // NOTE: the ctors below pass the address of an unitialized
     //       member variable, _C_filebuf, to a base class ctor
@@ -477,7 +477,7 @@
     basic_ofstream ()
         : basic_ostream<char_type, traits_type> (rdbuf ()) { }
 
-    _EXPLICIT basic_ofstream (const char         *__name,
+    explicit basic_ofstream (const char         *__name,
                               ios_base::openmode  __mode = ios_base::out,
                               long                __prot = 0666)
         : basic_ostream<char_type, traits_type> (rdbuf ()) {
@@ -487,7 +487,7 @@
 #ifndef _RWSTD_NO_EXT_FILEBUF
 
     // extensions - associate this with an open file and set buffer
-    _EXPLICIT
+    explicit
     basic_ofstream (int __fd, char_type *__buf = 0,
                     _RWSTD_STREAMSIZE __n = _RWSTD_DEFAULT_BUFSIZE)
         : basic_ostream<char_type, traits_type> (rdbuf ()) {
@@ -496,7 +496,7 @@
     
 #  ifdef stdin
 
-    _EXPLICIT
+    explicit
     basic_ofstream (FILE *__fptr, char_type *__buf = 0,
                     _RWSTD_STREAMSIZE __n = _RWSTD_DEFAULT_BUFSIZE)
         : basic_ostream<char_type, traits_type> (rdbuf ()) {
@@ -565,9 +565,9 @@
 
     typedef _CharT                          char_type;
     typedef _Traits                         traits_type;
-    typedef _TYPENAME traits_type::int_type int_type;
-    typedef _TYPENAME traits_type::pos_type pos_type;
-    typedef _TYPENAME traits_type::off_type off_type;
+    typedef typename traits_type::int_type int_type;
+    typedef typename traits_type::pos_type pos_type;
+    typedef typename traits_type::off_type off_type;
 
     // NOTE: the ctors below pass the address of an unitialized
     //       member variable, _C_filebuf, to a base class ctor
@@ -577,7 +577,7 @@
     basic_fstream ()
         : basic_iostream<char_type, traits_type>(rdbuf ()) { }
 
-    _EXPLICIT
+    explicit
     basic_fstream (const char         *__name,
                    ios_base::openmode  __mode = _RW::__rw_in_out,
                    long                __prot = 0666)
@@ -588,7 +588,7 @@
 #ifndef _RWSTD_NO_EXT_FILEBUF
 
     // extensions - associate this with an open file and set buffer
-    _EXPLICIT
+    explicit
     basic_fstream (int __fd, char_type *__buf = 0,
                    _RWSTD_STREAMSIZE __n = _RWSTD_DEFAULT_BUFSIZE)
         : basic_iostream<char_type, traits_type>(rdbuf ()) {
@@ -597,7 +597,7 @@
 
 #  ifdef stdin
 
-    _EXPLICIT
+    explicit
     basic_fstream (FILE *__fptr, char_type *__buf = 0,
                    _RWSTD_STREAMSIZE __n = _RWSTD_DEFAULT_BUFSIZE)
         : basic_iostream<char_type, traits_type>(rdbuf ()) {
diff --git a/include/fstream.cc b/include/fstream.cc
index 46a5199..c1e0dc0 100644
--- a/include/fstream.cc
+++ b/include/fstream.cc
@@ -157,7 +157,7 @@
         // restore position within file only if seek succeeded
         _RW::__rw_fseek (_C_file, this->_C_state, _C_cur_pos, ios_base::beg);
 
-        typedef _TYPENAME traits_type::state_type _StateT;
+        typedef typename traits_type::state_type _StateT;
         typedef codecvt<char_type, char, _StateT> _Codecvt;
 
         const _Codecvt &__cvt = _USE_FACET (_Codecvt, this->getloc ());
@@ -174,7 +174,7 @@
 
 
 template<class _CharT, class _Traits>
-_TYPENAME basic_filebuf<_CharT, _Traits>::int_type
+typename basic_filebuf<_CharT, _Traits>::int_type
 basic_filebuf<_CharT, _Traits>::
 underflow ()
 {
@@ -189,7 +189,7 @@
 
     char_type* const __to_end = this->_C_buffer + this->_C_bufsize;
 
-    typedef _TYPENAME traits_type::int_type _IntType;
+    typedef typename traits_type::int_type _IntType;
 
     _IntType __ret = _IntType ();
 
@@ -220,7 +220,7 @@
 
         _C_beg_pos = _C_cur_pos;
 
-        typedef _TYPENAME traits_type::state_type _StateT;
+        typedef typename traits_type::state_type _StateT;
         typedef codecvt<char_type, char, _StateT> _Codecvt;
 
         const _Codecvt &__cvt = _USE_FACET (_Codecvt, this->getloc ());
@@ -359,7 +359,7 @@
 
 
 template<class _CharT, class _Traits>
-_TYPENAME basic_filebuf<_CharT, _Traits>::int_type
+typename basic_filebuf<_CharT, _Traits>::int_type
 basic_filebuf<_CharT, _Traits>::
 overflow (int_type __c /* = eof () */)
 {
@@ -477,7 +477,7 @@
 
     const char_type* const __end = __buf + __nchars;
 
-    typedef _TYPENAME traits_type::state_type _StateT;
+    typedef typename traits_type::state_type _StateT;
 
     _RWSTD_STREAMSIZE __nwrote = 0;          // num chars to write
     _StateT __state = _C_cur_pos.state ();   // state of stream
@@ -581,7 +581,7 @@
 
 
 template<class _CharT, class _Traits>
-_TYPENAME basic_filebuf<_CharT, _Traits>::int_type
+typename basic_filebuf<_CharT, _Traits>::int_type
 basic_filebuf<_CharT, _Traits>::
 pbackfail (int_type __c)
 {
@@ -707,7 +707,7 @@
 
 // 27.8.1.4, p 11
 template<class _CharT, class _Traits>
-_TYPENAME basic_filebuf<_CharT, _Traits>::pos_type
+typename basic_filebuf<_CharT, _Traits>::pos_type
 basic_filebuf<_CharT, _Traits>::
 seekoff (off_type __off, ios_base::seekdir __way, ios_base::openmode)
 {
@@ -716,7 +716,7 @@
     if (!is_open ())
         return pos_type (off_type (-1));
 
-    typedef _TYPENAME traits_type::state_type _StateT;
+    typedef typename traits_type::state_type _StateT;
     typedef codecvt<char_type, char, _StateT> _Codecvt;
 
     const int __width = _USE_FACET (_Codecvt, this->getloc ()).encoding ();
@@ -757,7 +757,7 @@
 
 
 template<class _CharT, class _Traits>
-_TYPENAME basic_filebuf<_CharT, _Traits>::pos_type
+typename basic_filebuf<_CharT, _Traits>::pos_type
 basic_filebuf<_CharT, _Traits>::
 seekpos (pos_type __pos, ios_base::openmode)
 {
@@ -819,7 +819,7 @@
         if (_C_pbacksize == this->_C_bufsize)
             _C_pbacksize = this->_C_bufsize - 1;
 
-        typedef _TYPENAME traits_type::state_type _StateT;
+        typedef typename traits_type::state_type _StateT;
         typedef codecvt<char_type, char, _StateT> _Codecvt;
 
         const _Codecvt &__cvt = _USE_FACET (_Codecvt, this->getloc ());
@@ -956,7 +956,7 @@
 basic_filebuf<_CharT, _Traits>::
 _C_unshift ()
 {
-    typedef _TYPENAME traits_type::state_type _StateT;
+    typedef typename traits_type::state_type _StateT;
     typedef codecvt<char_type, char, _StateT> _Codecvt;
 
     const _Codecvt &__cvt = _USE_FACET (_Codecvt, this->getloc ());
diff --git a/include/functional b/include/functional
index d85edaa..927047c 100644
--- a/include/functional
+++ b/include/functional
@@ -37,7 +37,7 @@
  * permissions and limitations under the License.
  *
  * Copyright 1994-2006 Rogue Wave Software.
- * 
+ *
  **************************************************************************/
 
 #ifndef _RWSTD_FUNCTIONAL_INCLUDED
@@ -45,10 +45,16 @@
 
 
 #include <rw/_funcbase.h>
+
+#ifndef _RWSTD_NO_EXT_CXX_0X
+#  include <rw/_ref_wrap.h>
+#  include <rw/_forward.h>
+#endif
+
 #include <rw/_defs.h>
 
 
-_RWSTD_NAMESPACE (std) { 
+_RWSTD_NAMESPACE (std) {
 
 
 // 20.3.2 - Arithmetic operations
@@ -247,13 +253,13 @@
 // 20.3.5, p2
 template <class _Predicate>
 class unary_negate
-    : public unary_function<_TYPENAME _Predicate::argument_type, bool>
+    : public unary_function<typename _Predicate::argument_type, bool>
 {
     _Predicate _C_pred;
 public:
-    _RWSTD_UNARY_FUNCTION_TYPES (_TYPENAME _Predicate::argument_type, bool);
+    _RWSTD_UNARY_FUNCTION_TYPES (typename _Predicate::argument_type, bool);
 
-    _EXPLICIT unary_negate (const _Predicate &__pred) : _C_pred (__pred) { }
+    explicit unary_negate (const _Predicate &__pred) : _C_pred (__pred) { }
 
     result_type operator() (const argument_type &__x) const {
         return !_C_pred (__x);
@@ -272,17 +278,17 @@
 // 20.3.5, p4
 template <class _Predicate>
 class binary_negate
-    : public binary_function<_TYPENAME _Predicate::first_argument_type,
-                             _TYPENAME _Predicate::second_argument_type, bool>
+    : public binary_function<typename _Predicate::first_argument_type,
+                             typename _Predicate::second_argument_type, bool>
 {
     _Predicate _C_pred;
 public:
 
-    _RWSTD_BINARY_FUNCTION_TYPES (_TYPENAME _Predicate::first_argument_type,
-                                  _TYPENAME _Predicate::second_argument_type,
+    _RWSTD_BINARY_FUNCTION_TYPES (typename _Predicate::first_argument_type,
+                                  typename _Predicate::second_argument_type,
                                   bool);
 
-    _EXPLICIT binary_negate (const _Predicate &__pred) : _C_pred (__pred) { }
+    explicit binary_negate (const _Predicate &__pred) : _C_pred (__pred) { }
 
     result_type operator() (const first_argument_type  &__x,
                             const second_argument_type &__y) const {
@@ -304,19 +310,19 @@
 // 20.3.6.1
 template <class _Operation>
 class binder1st
-    : public unary_function<_TYPENAME _Operation::second_argument_type,
-                            _TYPENAME _Operation::result_type>
+    : public unary_function<typename _Operation::second_argument_type,
+                            typename _Operation::result_type>
 {
 protected:
     _Operation                                op;
-    _TYPENAME _Operation::first_argument_type value;
+    typename _Operation::first_argument_type value;
 public:
 
-    _RWSTD_UNARY_FUNCTION_TYPES (_TYPENAME _Operation::second_argument_type,
-                                 _TYPENAME _Operation::result_type);
+    _RWSTD_UNARY_FUNCTION_TYPES (typename _Operation::second_argument_type,
+                                 typename _Operation::result_type);
 
     binder1st (const _Operation                                &__oper,
-               const _TYPENAME _Operation::first_argument_type &__x)
+               const typename _Operation::first_argument_type &__x)
         : op (__oper), value (__x) { }
 
     result_type
@@ -331,7 +337,7 @@
 inline binder1st<_Operation>
 bind1st (const _Operation &__oper, const _TypeT &__x)
 {
-    typedef _TYPENAME _Operation::first_argument_type first_argument_type;
+    typedef typename _Operation::first_argument_type first_argument_type;
 
     return binder1st<_Operation>(__oper, first_argument_type (__x));
 }
@@ -340,19 +346,19 @@
 // 20.3.6.3
 template <class _Operation>
 class binder2nd
-    : public unary_function<_TYPENAME _Operation::first_argument_type,
-                            _TYPENAME _Operation::result_type>
+    : public unary_function<typename _Operation::first_argument_type,
+                            typename _Operation::result_type>
 {
 protected:
     _Operation                                 op;
-    _TYPENAME _Operation::second_argument_type value;
+    typename _Operation::second_argument_type value;
 public:
 
-    _RWSTD_UNARY_FUNCTION_TYPES (_TYPENAME _Operation::first_argument_type,
-                                 _TYPENAME _Operation::result_type);
+    _RWSTD_UNARY_FUNCTION_TYPES (typename _Operation::first_argument_type,
+                                 typename _Operation::result_type);
 
     binder2nd (const _Operation                                 &__oper,
-               const _TYPENAME _Operation::second_argument_type &__y)
+               const typename _Operation::second_argument_type &__y)
         : op (__oper), value (__y) { }
 
     result_type
@@ -367,7 +373,7 @@
 inline binder2nd<_Operation>
 bind2nd (const _Operation &__oper, const _TypeT &__x)
 {
-    typedef _TYPENAME _Operation::second_argument_type second_argument_type;
+    typedef typename _Operation::second_argument_type second_argument_type;
     return binder2nd<_Operation>(__oper, second_argument_type (__x));
 }
 
@@ -380,7 +386,7 @@
 {
     _RWSTD_UNARY_FUNCTION_TYPES (_Arg, _Result);
 
-    _EXPLICIT pointer_to_unary_function (result_type (*__fun)(argument_type))
+    explicit pointer_to_unary_function (result_type (*__fun)(argument_type))
         : _C_fn (__fun) {}
 
     result_type operator() (argument_type __x) const {
@@ -408,7 +414,7 @@
 {
     _RWSTD_BINARY_FUNCTION_TYPES (_Arg1, _Arg2, _Result);
 
-    _EXPLICIT
+    explicit
     pointer_to_binary_function (result_type (*__fun)(first_argument_type,
                                                     second_argument_type))
         : _C_fn (__fun) { }
@@ -441,7 +447,7 @@
 {
     _RWSTD_UNARY_FUNCTION_TYPES (_TypeT*, _Result);
 
-    _EXPLICIT mem_fun_t (result_type (_TypeT::*__fun)()) : _C_fn (__fun) { }
+    explicit mem_fun_t (result_type (_TypeT::*__fun)()) : _C_fn (__fun) { }
 
     result_type operator() (argument_type __x) const {
         return (__x->*_C_fn)();
@@ -459,7 +465,7 @@
 {
     _RWSTD_BINARY_FUNCTION_TYPES (_TypeT*, _Arg, _Result);
 
-    _EXPLICIT
+    explicit
     mem_fun1_t (result_type (_TypeT::*__fun)(second_argument_type))
         : _C_fn (__fun) { }
 
@@ -496,7 +502,7 @@
 {
     _RWSTD_UNARY_FUNCTION_TYPES (_TypeT, _Result);
 
-    _EXPLICIT mem_fun_ref_t (result_type (_TypeT::*__fun)()) : _C_fn (__fun) { }
+    explicit mem_fun_ref_t (result_type (_TypeT::*__fun)()) : _C_fn (__fun) { }
 
     result_type operator() (argument_type &__x) const {
         return (__x.*_C_fn)();
@@ -514,7 +520,7 @@
 {
     _RWSTD_BINARY_FUNCTION_TYPES (_TypeT, _Arg, _Result);
 
-    _EXPLICIT
+    explicit
     mem_fun1_ref_t (result_type (_TypeT::*__fun)(second_argument_type))
         : _C_fn (__fun) { }
 
@@ -552,7 +558,7 @@
 {
     _RWSTD_UNARY_FUNCTION_TYPES (const _TypeT*, _Result);
 
-    _EXPLICIT const_mem_fun_t (result_type (_TypeT::*__fun)() const)
+    explicit const_mem_fun_t (result_type (_TypeT::*__fun)() const)
         : _C_fn (__fun) { }
 
     result_type operator() (argument_type __x) const {
@@ -571,7 +577,7 @@
 {
     _RWSTD_BINARY_FUNCTION_TYPES (const _TypeT*, _Arg, _Result);
 
-    _EXPLICIT
+    explicit
     const_mem_fun1_t (result_type (_TypeT::*__fun)(second_argument_type) const)
         : _C_fn (__fun) { }
 
@@ -609,7 +615,7 @@
 {
     _RWSTD_UNARY_FUNCTION_TYPES (_TypeT, _Result);
 
-    _EXPLICIT const_mem_fun_ref_t (result_type (_TypeT::*__fun)() const)
+    explicit const_mem_fun_ref_t (result_type (_TypeT::*__fun)() const)
         : _C_fn (__fun) { }
 
     result_type operator() (const argument_type &__x) const {
@@ -628,7 +634,7 @@
 {
     _RWSTD_BINARY_FUNCTION_TYPES (_TypeT, _Arg, _Result);
 
-    _EXPLICIT
+    explicit
     const_mem_fun1_ref_t
         (result_type (_TypeT::*__fun)(second_argument_type) const)
             : _C_fn (__fun) { }
@@ -663,7 +669,7 @@
 }   // namespace std
 
 
-_RWSTD_NAMESPACE (__rw) { 
+_RWSTD_NAMESPACE (__rw) {
 
 
 // extension: returns the argument
diff --git a/include/iomanip b/include/iomanip
index 4c9200c..c7f3277 100644
--- a/include/iomanip
+++ b/include/iomanip
@@ -136,7 +136,7 @@
 template <class _Functor, class _TypeT>
 struct __rw_smanip
 {
-    _EXPLICIT
+    explicit
     __rw_smanip (_TypeT __arg)
         : _C_fun (), _C_arg (__arg) { /* empty */ }
 
diff --git a/include/istream b/include/istream
index 7b1e45f..d1c4e48 100644
--- a/include/istream
+++ b/include/istream
@@ -129,12 +129,12 @@
 
     typedef _CharT                                    char_type;
     typedef _Traits                                   traits_type;
-    typedef _TYPENAME traits_type::int_type           int_type;
-    typedef _TYPENAME traits_type::pos_type           pos_type;
-    typedef _TYPENAME traits_type::off_type           off_type;
+    typedef typename traits_type::int_type           int_type;
+    typedef typename traits_type::pos_type           pos_type;
+    typedef typename traits_type::off_type           off_type;
       
     // 27.6.1.1.1, p1
-    _EXPLICIT basic_istream (basic_streambuf<char_type, traits_type> *__sb)
+    explicit basic_istream (basic_streambuf<char_type, traits_type> *__sb)
         : _C_gcount (0) {
         this->init (__sb);
     }
@@ -156,7 +156,7 @@
     struct sentry: _RW::__rw_guard {
 
         // 27.6.1.1.2, p2 - assumes 0 != __strm.rdbuf ()
-        _EXPLICIT sentry (basic_istream &__strm, bool __noskipws = false)
+        explicit sentry (basic_istream &__strm, bool __noskipws = false)
             : _RW::__rw_guard (__strm._C_bufmutex ()),
               _C_ok (__strm._C_ipfx (__noskipws).good ()) { /* no-op */ }
 
@@ -362,7 +362,7 @@
 
 
 template<class _CharT, class _Traits>
-inline _TYPENAME basic_istream<_CharT, _Traits>::int_type
+inline typename basic_istream<_CharT, _Traits>::int_type
 basic_istream<_CharT, _Traits>::
 get ()
 {
@@ -445,7 +445,7 @@
 
 
 template<class _CharT, class _Traits>
-inline _TYPENAME basic_istream<_CharT, _Traits>::int_type
+inline typename basic_istream<_CharT, _Traits>::int_type
 basic_istream<_CharT, _Traits>::peek ()
 {
     _RWSTD_ASSERT (0 != this->rdbuf ());
@@ -543,7 +543,7 @@
 ws (basic_istream<_CharT, _Traits> &__strm)
 {
     // construct a sentry to flush tied stream (if any) and lock
-    const _TYPENAME basic_istream<_CharT, _Traits>::sentry
+    const typename basic_istream<_CharT, _Traits>::sentry
         __ipfx (__strm, true /* noskipws */);
 
     // if sentry is okay, skip whitespace and set eofbit
@@ -572,11 +572,11 @@
     // prevent ambiguity between types defined in the bases
     typedef _CharT                          char_type;
     typedef _Traits                         traits_type;
-    typedef _TYPENAME traits_type::int_type int_type;
-    typedef _TYPENAME traits_type::pos_type pos_type;
-    typedef _TYPENAME traits_type::off_type off_type;
+    typedef typename traits_type::int_type int_type;
+    typedef typename traits_type::pos_type pos_type;
+    typedef typename traits_type::off_type off_type;
 
-    _EXPLICIT basic_iostream (basic_streambuf<_CharT, _Traits> *__sb)
+    explicit basic_iostream (basic_streambuf<_CharT, _Traits> *__sb)
         : basic_istream<_CharT, _Traits>(__sb), 
           basic_ostream<_CharT, _Traits>(__sb)
         { /* 27.6.1.5.1, p1 */ }
diff --git a/include/istream.cc b/include/istream.cc
index 0391330..c357219 100644
--- a/include/istream.cc
+++ b/include/istream.cc
@@ -44,7 +44,7 @@
     _STD::ios_base::iostate __err = _STD::ios_base::goodbit;
 
     // eat leading whitespace, catching exceptions from sentry
-    const _TYPENAME _STD::basic_istream<_CharT, _Traits>::sentry
+    const typename _STD::basic_istream<_CharT, _Traits>::sentry
         __ipfx (__strm /* , noskipws = false */);
 
     if (__ipfx) {
@@ -150,7 +150,7 @@
 
 
 template<class _CharT, class _Traits>
-_TYPENAME basic_istream<_CharT, _Traits>::int_type
+typename basic_istream<_CharT, _Traits>::int_type
 basic_istream<_CharT, _Traits>::
 _C_unsafe_get (streamsize *__cnt   /* = 0     */,               
                int_type    __delim /* = eof() */,
@@ -447,7 +447,7 @@
 
 
 template<class _CharT, class _Traits>
-_TYPENAME basic_istream<_CharT, _Traits>::pos_type
+typename basic_istream<_CharT, _Traits>::pos_type
 basic_istream<_CharT, _Traits>::
 tellg ()
 {
diff --git a/include/list b/include/list
index ca3bf33..551b5a6 100644
--- a/include/list
+++ b/include/list
@@ -76,10 +76,10 @@
 
 public:
 
-    typedef _TYPENAME _C_iter_base::value_type      value_type;
-    typedef _TYPENAME _C_iter_base::difference_type difference_type;
-    typedef _TYPENAME _C_iter_base::pointer         pointer;
-    typedef _TYPENAME _C_iter_base::reference       reference;
+    typedef typename _C_iter_base::value_type      value_type;
+    typedef typename _C_iter_base::difference_type difference_type;
+    typedef typename _C_iter_base::pointer         pointer;
+    typedef typename _C_iter_base::reference       reference;
 
     // const_pointer and const_reference must be explicity typedef'ed to
     // const value_type* and const value_type& since we don't know if
@@ -182,12 +182,12 @@
 
     typedef _TypeT                                    value_type;
     typedef _Allocator                                allocator_type;
-    typedef _TYPENAME allocator_type::reference       reference;
-    typedef _TYPENAME allocator_type::const_reference const_reference;
-    typedef _TYPENAME allocator_type::size_type       size_type;
-    typedef _TYPENAME allocator_type::difference_type difference_type;
-    typedef _TYPENAME allocator_type::pointer         pointer;
-    typedef _TYPENAME allocator_type::const_pointer   const_pointer;
+    typedef typename allocator_type::reference       reference;
+    typedef typename allocator_type::const_reference const_reference;
+    typedef typename allocator_type::size_type       size_type;
+    typedef typename allocator_type::difference_type difference_type;
+    typedef typename allocator_type::pointer         pointer;
+    typedef typename allocator_type::const_pointer   const_pointer;
     typedef __rw_list_node<value_type>                _C_list_node;
     typedef _C_list_node*                             _C_link_type;
 
@@ -262,15 +262,15 @@
     // Node buffer data structure
     struct _C_nodebuf {
         typedef _RWSTD_REBIND (allocator_type, _C_nodebuf) _C_alloc_type;
-        typedef _TYPENAME _C_alloc_type::pointer           _C_pointer;
+        typedef typename _C_alloc_type::pointer           _C_pointer;
 
         _C_pointer   _C_next_buf;
         size_type    _C_bufsize;
         _C_link_type _C_buffer;
     };
 
-    typedef _TYPENAME _C_nodebuf::_C_alloc_type _C_buf_alloc_type;
-    typedef _TYPENAME _C_nodebuf::_C_pointer    _C_buf_pointer;
+    typedef typename _C_nodebuf::_C_alloc_type _C_buf_alloc_type;
+    typedef typename _C_nodebuf::_C_pointer    _C_buf_pointer;
 
     void _C_add_buffer (bool);
     void _C_free_buffers ();
@@ -378,14 +378,14 @@
 
 public:
 
-    _EXPLICIT
+    explicit
     list (const allocator_type& __alloc = allocator_type ())
         : allocator_type (__alloc), _RWSTD_NODE_BUFFER_INIT(0,0)
           _C_next_avail (0), _C_last (0), _C_node (0), _C_length (0) {
         _C_init (true);
     }
     
-    _EXPLICIT
+    explicit
     list (size_type             __n, 
           const_reference       __x     = value_type (),
           const allocator_type &__alloc = allocator_type ())
@@ -603,19 +603,10 @@
     // uses transfer_node to merge in list by transfering nodes to list
     void _C_adjacent_merge (iterator, iterator, iterator);
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
     // uses transfer_node to merge in list by transfering nodes to list
     template<class _Compare>
     void _C_adjacent_merge (iterator, iterator, iterator, _Compare);
 
-#else   // if defined (_RWSTD_NO_MEMBER_TEMPLATES)
-
-    void _C_adjacent_merge (iterator, iterator, iterator,
-                           bool (*)(const_reference, const_reference));
-
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
-      
     void _C_insert (iterator __it, size_type __n, const_reference __x) {
         _RWSTD_ASSERT_RANGE (begin (), __it);
 
@@ -655,8 +646,6 @@
 
     void sort ();
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
     template<class _Predicate>
     void remove_if (_Predicate);
 
@@ -669,18 +658,6 @@
     template<class _Compare>
     void sort (_Compare);
 
-#else   // if defined (_RWSTD_NO_MEMBER_TEMPLATES)
-
-    void remove_if (bool (*)(const_reference));
-
-    void unique (bool (*)(const_reference, const_reference));
-
-    void merge (list &__x, bool (*)(const_reference, const_reference));
-
-    void sort (bool (*)(const_reference, const_reference));
-
-#endif // _RWSTD_NO_MEMBER_TEMPLATES
-
 };
 
 
@@ -753,7 +730,7 @@
 
 
 template <class _TypeT, class _Allocator>
-inline _TYPENAME list<_TypeT, _Allocator>::iterator 
+inline typename list<_TypeT, _Allocator>::iterator 
 list<_TypeT, _Allocator>::insert (iterator __it, const_reference __x)
 {
     _RWSTD_ASSERT_RANGE (begin (), __it);
@@ -787,7 +764,7 @@
 
 
 template <class _TypeT, class _Allocator>
-inline _TYPENAME list<_TypeT, _Allocator>::iterator 
+inline typename list<_TypeT, _Allocator>::iterator 
 list<_TypeT, _Allocator>::erase (iterator __it)
 {
     _RWSTD_ASSERT_RANGE (begin (), __it);
diff --git a/include/list.cc b/include/list.cc
index f356ba0..c6cfcc6 100644
--- a/include/list.cc
+++ b/include/list.cc
@@ -55,7 +55,7 @@
 
 
 template <class _TypeT, class _Allocator>
-_TYPENAME list<_TypeT, _Allocator>::iterator 
+typename list<_TypeT, _Allocator>::iterator 
 list<_TypeT, _Allocator>::erase (iterator __first, iterator __last)
 {
     _RWSTD_ASSERT_RANGE (begin (), __first);
@@ -457,22 +457,11 @@
 }
 
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
 template <class _TypeT, class _Allocator>
 template<class _Compare>
 void list<_TypeT, _Allocator>::
 _C_adjacent_merge (iterator __first1, iterator __last1, iterator __last2,
                    _Compare __cmp)
-
-#else   // if defined (_RWSTD_NO_MEMBER_TEMPLATES)
-
-template <class _TypeT, class _Allocator>
-void list<_TypeT, _Allocator>::
-_C_adjacent_merge (iterator __first1, iterator __last1, iterator __last2,
-                   bool (*__cmp)(const_reference, const_reference))
-
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
 {
     difference_type __n = _DISTANCE (__first1, __last1, difference_type);
 
@@ -490,19 +479,9 @@
 }
 
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
 template<class _TypeT, class _Allocator>
 template<class _Predicate>
 void list<_TypeT, _Allocator>::remove_if (_Predicate __pred)
-
-#else   // if defined (_RWSTD_NO_MEMBER_TEMPLATES)
-
-template<class _TypeT, class _Allocator>
-void list<_TypeT, _Allocator>::remove_if (bool (*__pred)(const_reference))
-
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
-
 {
     iterator __first = begin ();
     iterator __last = end ();
@@ -516,19 +495,10 @@
     }
 }
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
 
 template<class _TypeT, class _Allocator>
 template<class _BinaryPredicate>
 void list<_TypeT, _Allocator>::unique (_BinaryPredicate __pred)
-
-#else   // if defined (_RWSTD_NO_MEMBER_TEMPLATES)
-
-template<class _TypeT, class _Allocator>
-void list<_TypeT, _Allocator>::
-unique (bool (*__pred)(const_reference, const_reference))
-
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
 {
     iterator __first = begin ();
     iterator __last = end ();
@@ -547,21 +517,10 @@
 }
 
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
 template<class _TypeT, class _Allocator>
 template<class _Compare>
 void list<_TypeT, _Allocator>::
 merge (list<_TypeT, _Allocator>& __x, _Compare __cmp)
-
-#else   // if defined (_RWSTD_NO_MEMBER_TEMPLATES)
-
-template<class _TypeT, class _Allocator>
-void list<_TypeT, _Allocator>::
-merge (list<_TypeT, _Allocator>& __x,
-       bool (*__cmp)(const_reference, const_reference))
-
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
 {
     if (&__x == this)
         return;
@@ -585,19 +544,9 @@
 }
 
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
 template <class _TypeT, class _Allocator>
 template<class _Compare>
 void list<_TypeT, _Allocator>::sort (_Compare __cmp)
-
-#else   // if defined (_RWSTD_NO_MEMBER_TEMPLATES)
-
-template <class _TypeT, class _Allocator>
-void list<_TypeT, _Allocator>::
-sort (bool (*__cmp)(const_reference, const_reference))
-
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
 {
     for (size_type __n = 1; __n < size (); __n *= 2) {
 
diff --git a/include/loc/_codecvt.h b/include/loc/_codecvt.h
index 52f0fed..2e91b41 100644
--- a/include/loc/_codecvt.h
+++ b/include/loc/_codecvt.h
@@ -118,7 +118,7 @@
 
 public:
 
-    _EXPLICIT codecvt (_RWSTD_SIZE_T __ref = 0): _RW::__rw_facet (__ref) { }
+    explicit codecvt (_RWSTD_SIZE_T __ref = 0): _RW::__rw_facet (__ref) { }
 
     // 22,2,1,5,1, p1
     result out (state_type& __state,
@@ -186,7 +186,7 @@
     typedef char             intern_type;
     typedef _RWSTD_MBSTATE_T state_type;
 
-    _EXPLICIT codecvt (_RWSTD_SIZE_T = 0);
+    explicit codecvt (_RWSTD_SIZE_T = 0);
 
     virtual ~codecvt ();
 
@@ -330,7 +330,7 @@
 
 public:
 
-    _EXPLICIT codecvt (_RWSTD_SIZE_T = 0);
+    explicit codecvt (_RWSTD_SIZE_T = 0);
 
     result out (state_type& __state,
                 const intern_type *__from, const intern_type *__from_end,
@@ -394,7 +394,7 @@
     typedef _ExternT extern_type;
     typedef _StateT  state_type; 
 
-    _EXPLICIT codecvt_byname (const char *__name, _RWSTD_SIZE_T __ref = 0)
+    explicit codecvt_byname (const char *__name, _RWSTD_SIZE_T __ref = 0)
         : codecvt <_InternT, _ExternT, _StateT> (__ref) {
         this->_C_set_name (__name, _C_namebuf, sizeof _C_namebuf);
     }
@@ -413,7 +413,7 @@
 
 public:
 
-    _EXPLICIT codecvt_byname (const char*, _RWSTD_SIZE_T = 0);
+    explicit codecvt_byname (const char*, _RWSTD_SIZE_T = 0);
 
 protected:
 
diff --git a/include/loc/_collate.h b/include/loc/_collate.h
index ef0be8a..1f3b350 100644
--- a/include/loc/_collate.h
+++ b/include/loc/_collate.h
@@ -63,7 +63,7 @@
                          allocator<char_type> >
     string_type;
 
-    _EXPLICIT collate (_RWSTD_SIZE_T __refs = 0)
+    explicit collate (_RWSTD_SIZE_T __refs = 0)
         : _RW::__rw_facet (__refs) { }
 
     int
@@ -110,7 +110,7 @@
                          allocator<char_type> >
     string_type;
 
-    _EXPLICIT collate (_RWSTD_SIZE_T __refs = 0)
+    explicit collate (_RWSTD_SIZE_T __refs = 0)
         : _RW::__rw_facet (__refs) { }
 
     int
@@ -156,7 +156,7 @@
                          allocator<char_type> >
     string_type;
 
-    _EXPLICIT collate (_RWSTD_SIZE_T __refs = 0)
+    explicit collate (_RWSTD_SIZE_T __refs = 0)
         : _RW::__rw_facet (__refs) { }
 
     int
@@ -200,7 +200,7 @@
 
 public:
 
-    _EXPLICIT collate_byname (const char *__name, _RWSTD_SIZE_T __ref = 0)
+    explicit collate_byname (const char *__name, _RWSTD_SIZE_T __ref = 0)
         : collate<_CharT>(__ref) {
         this->_C_set_name (__name, _C_namebuf, sizeof _C_namebuf);
     }
@@ -213,7 +213,7 @@
     char _C_namebuf [32];
 public:
 
-    _EXPLICIT collate_byname (const char* __name, _RWSTD_SIZE_T __ref = 0)
+    explicit collate_byname (const char* __name, _RWSTD_SIZE_T __ref = 0)
         :  collate<char_type>(__ref){ 
         this->_C_set_name (__name, _C_namebuf, sizeof _C_namebuf);
     }
@@ -237,7 +237,7 @@
     char _C_namebuf [32];
 public:
 
-    _EXPLICIT collate_byname (const char* __name, _RWSTD_SIZE_T __ref = 0)
+    explicit collate_byname (const char* __name, _RWSTD_SIZE_T __ref = 0)
         :  collate<char_type>(__ref){ 
         this->_C_set_name (__name, _C_namebuf, sizeof _C_namebuf);
     }
diff --git a/include/loc/_ctype.cc b/include/loc/_ctype.cc
index b3a9845..b917da0 100644
--- a/include/loc/_ctype.cc
+++ b/include/loc/_ctype.cc
@@ -37,7 +37,7 @@
 
 
 template <class _CharT> 
-/* virtual */ const _TYPENAME ctype<_CharT>::char_type*
+/* virtual */ const typename ctype<_CharT>::char_type*
 ctype<_CharT>::
 do_is (const char_type *__lo, const char_type *__hi, mask *__m) const
 {
@@ -52,7 +52,7 @@
 
 
 template <class _CharT> 
-/* virtual */ const _TYPENAME ctype<_CharT>::char_type*
+/* virtual */ const typename ctype<_CharT>::char_type*
 ctype<_CharT>::
 do_scan_is (mask __m, const char_type *__lo, const char_type *__hi) const
 {
@@ -68,7 +68,7 @@
 
 
 template <class _CharT> 
-/* virtual */ const _TYPENAME ctype<_CharT>::char_type*
+/* virtual */ const typename ctype<_CharT>::char_type*
 ctype<_CharT>::
 do_scan_not (mask __m, const char_type *__lo, const char_type *__hi) const
 {
@@ -84,7 +84,7 @@
 
 
 template <class _CharT> 
-/* virtual */ const _TYPENAME ctype<_CharT>::char_type*
+/* virtual */ const typename ctype<_CharT>::char_type*
 ctype<_CharT>::
 do_toupper (char_type *__lo, const char_type *__hi) const
 {
@@ -99,7 +99,7 @@
 
 
 template <class _CharT> 
-/* virtual */ const _TYPENAME ctype<_CharT>::char_type*
+/* virtual */ const typename ctype<_CharT>::char_type*
 ctype<_CharT>::
 do_tolower (char_type *__lo, const char_type *__hi) const
 {
@@ -128,7 +128,7 @@
 
 
 template <class _CharT> 
-/* virtual */ const _TYPENAME ctype<_CharT>::char_type*
+/* virtual */ const typename ctype<_CharT>::char_type*
 ctype<_CharT>::
 do_narrow (const char_type *__lo, const char_type *__hi,
            char __dfault, char *__dest) const
diff --git a/include/loc/_ctype.h b/include/loc/_ctype.h
index d68ea38..897fcd7 100644
--- a/include/loc/_ctype.h
+++ b/include/loc/_ctype.h
@@ -102,7 +102,7 @@
 
     typedef _CharT char_type;
 
-    _EXPLICIT ctype (_RWSTD_SIZE_T __ref = 0)
+    explicit ctype (_RWSTD_SIZE_T __ref = 0)
         : _RW::__rw_facet (__ref) { }
 
 
@@ -242,7 +242,7 @@
 
     _RWSTD_STATIC_CONST (_RWSTD_SIZE_T, table_size = 256);
 
-    _EXPLICIT ctype (const mask* = 0, bool = false, _RWSTD_SIZE_T = 0);
+    explicit ctype (const mask* = 0, bool = false, _RWSTD_SIZE_T = 0);
 
     const char_type* is (const char_type*, const char_type*, mask*) const;
 
@@ -390,7 +390,7 @@
 
 public:
 
-    _EXPLICIT ctype_byname (const char *__name, _RWSTD_SIZE_T __ref = 0)
+    explicit ctype_byname (const char *__name, _RWSTD_SIZE_T __ref = 0)
         : ctype<_CharT>(__ref) {
         this->_C_set_name (__name, _C_namebuf, sizeof _C_namebuf);
     }
@@ -404,7 +404,7 @@
 
 public:
 
-    _EXPLICIT ctype_byname (const char*, _RWSTD_SIZE_T = 0);
+    explicit ctype_byname (const char*, _RWSTD_SIZE_T = 0);
 };
 
 
@@ -421,7 +421,7 @@
 
     typedef wchar_t char_type;
 
-    _EXPLICIT ctype (_RWSTD_SIZE_T = 0);
+    explicit ctype (_RWSTD_SIZE_T = 0);
 
     // 22.2.1.1.1, p1
     bool is (mask __m, char_type __c) const {
@@ -597,7 +597,7 @@
 {
 public:
 
-    _EXPLICIT ctype_byname (const char*, _RWSTD_SIZE_T = 0);
+    explicit ctype_byname (const char*, _RWSTD_SIZE_T = 0);
 
 protected:
 
diff --git a/include/loc/_facet.h b/include/loc/_facet.h
index 3c594cb..a09cb2c 100644
--- a/include/loc/_facet.h
+++ b/include/loc/_facet.h
@@ -64,7 +64,7 @@
 
 #endif   // !MSVC || 5 <= stdcxx version
 
-    _EXPLICIT __rw_facet (_RWSTD_SIZE_T = 0);
+    explicit __rw_facet (_RWSTD_SIZE_T = 0);
 
     virtual ~__rw_facet ();
 
diff --git a/include/loc/_locale.h b/include/loc/_locale.h
index c6f3911..a497ba9 100644
--- a/include/loc/_locale.h
+++ b/include/loc/_locale.h
@@ -175,83 +175,28 @@
     _RWSTD_MEMBER_EXPORT locale (const locale&) _THROWS (());
 
     // 22.1.1.2, p6
-    _RWSTD_MEMBER_EXPORT _EXPLICIT locale (const char*);
+    _RWSTD_MEMBER_EXPORT explicit locale (const char*);
 
     // 22.1.1.2, p9
     _RWSTD_MEMBER_EXPORT locale (const locale&, const char*, category);
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
     // 22.1.1.2, p12
     template <class _Facet>
     locale (const locale&, _Facet*);
 
-#  ifndef _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE
+#ifndef _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE
 
     // 22.1.1.3, p1
     template <class _Facet>
     locale combine (const locale&) const;
 
-#  endif   // _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE
+#endif   // _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE
 
     // 22.1.1.4, p3
     template <class _CharT, class _Traits, class _Allocator>
     bool operator() (const basic_string<_CharT, _Traits, _Allocator>&,
                      const basic_string<_CharT, _Traits, _Allocator>&) const;
 
-#else   // if defined (_RWSTD_NO_MEMBER_TEMPLATES)
-
-    template <class _Facet>
-    locale (const locale &__rhs, _Facet *__facet)
-        : _C_body (0) {
-        // initialize facet's member id to point to Facet::id
-        if (__facet && !__facet->_C_pid) {
-        // unusual cast (to size_t** rather than size_t*&)
-        // done to work around an HP aCC 3.3x bug
-            *_RWSTD_CONST_CAST (_RWSTD_SIZE_T**, &__facet->_C_pid) =
-                &_Facet::id._C_id;
-        }
-
-        // uninitialized Facet::id will be initialized by has_facet<>()
-
-        // prevent passing `facet' the ctor if it is installed
-        // in `rhs' to potentially avoid creating a whole new body
-        if (   has_facet<_Facet>(__rhs)
-            && &use_facet<_Facet>(__rhs) == __facet)
-            __facet = 0;
-
-        *this = locale (*__rhs._C_body, __facet);
-    }
-
-#  ifndef _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE
-
-    template <class _Facet>
-    locale combine (const locale &__rhs) const {
-        // unitialized Facet::id will be initialized by has_facet<>()
-
-        _RWSTD_REQUIRES (has_facet<_Facet>(__rhs),
-                         (_RWSTD_ERROR_FACET_NOT_FOUND,
-                         _RWSTD_FUNC ("locale::combine (const locale&)"),
-                         _Facet::id._C_id, __rhs.name ().c_str ()));
-
-        return locale (__rhs, &use_facet<_Facet>(__rhs));
-    }
-
-#  endif   // _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE
-
-    template <class _CharT, class _Traits, class _Allocator>
-    bool
-    operator() (const basic_string<_CharT, _Traits, _Allocator> &__x,
-                const basic_string<_CharT, _Traits, _Allocator> &__y) const {
-        // qualify collate to distinguish it from locale::collate
-        return use_facet<_STD::collate<_CharT> >(*this)
-            .compare (__x.data (), __x.data () + __x.length (),
-                      __y.data (), __y.data () + __y.length ()) < 0;
-    }
-
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
-
-
     // 22.1.1.2, p14
     _RWSTD_MEMBER_EXPORT locale (const locale&, const locale&, category);
 
@@ -280,7 +225,7 @@
 
 private:
 
-    _RWSTD_MEMBER_EXPORT _EXPLICIT locale (_RW::__rw_locale &__rhs) 
+    _RWSTD_MEMBER_EXPORT explicit locale (_RW::__rw_locale &__rhs) 
         _THROWS (())
         : _C_body (&__rhs) { }
 
@@ -506,8 +451,6 @@
 _RWSTD_NAMESPACE (std) {
 
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
 template <class _Facet>
 inline locale::locale (const locale &__rhs, _Facet *__facet)
     : _C_body (0)
@@ -531,7 +474,7 @@
 }
 
 
-#  ifndef _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE
+#ifndef _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE
 
 template <class _Facet>
 inline locale locale::combine (const locale &__rhs) const
@@ -546,7 +489,7 @@
     return locale (*this, &use_facet<_Facet>(__rhs));
 }
 
-#  endif   // _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE
+#endif   // _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE
 
 
 template <class _CharT, class _Traits, class _Allocator>
@@ -561,9 +504,6 @@
 }
 
 
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
-
-
 }   // namespace std
 
 
diff --git a/include/loc/_messages.cc b/include/loc/_messages.cc
index f5f8621..dcd2931 100644
--- a/include/loc/_messages.cc
+++ b/include/loc/_messages.cc
@@ -55,7 +55,7 @@
 
 
 template <class _CharT>
-_TYPENAME messages<_CharT>::string_type
+typename messages<_CharT>::string_type
 messages<_CharT>::do_get (messages_base::catalog __cat,
                           int                    __set,
                           int                    __msgid,
@@ -67,7 +67,7 @@
         typedef _STD::codecvt<_CharT, char, _RWSTD_MBSTATE_T>
             _CodeCvt;
 
-        typedef _TYPENAME _CodeCvt::state_type state_type;
+        typedef typename _CodeCvt::state_type state_type;
 
         const _CodeCvt& __codecvt =
             _RWSTD_USE_FACET (_CodeCvt, _RW::__rw_get_locale (__cat));
diff --git a/include/loc/_messages.h b/include/loc/_messages.h
index 27f211b..529dd46 100644
--- a/include/loc/_messages.h
+++ b/include/loc/_messages.h
@@ -81,7 +81,7 @@
     typedef basic_string<char_type, char_traits<char_type>,
                          allocator<char_type> > string_type;
 
-    _EXPLICIT messages (_RWSTD_SIZE_T __refs = 0)
+    explicit messages (_RWSTD_SIZE_T __refs = 0)
         : _RW::__rw_facet (__refs) { }
 
 
@@ -132,7 +132,7 @@
 
 public:
 
-    _EXPLICIT messages_byname (const char *__name, _RWSTD_SIZE_T __refs = 0)
+    explicit messages_byname (const char *__name, _RWSTD_SIZE_T __refs = 0)
         : messages<_CharT>(__refs) {
         this->_C_set_name (__name, _C_namebuf, sizeof _C_namebuf);
     }
diff --git a/include/loc/_money_get.cc b/include/loc/_money_get.cc
index 65a668a..112b4ee 100644
--- a/include/loc/_money_get.cc
+++ b/include/loc/_money_get.cc
@@ -53,7 +53,7 @@
 
 
 template <class _CharT, class _InputIter>
-_TYPENAME money_get<_CharT, _InputIter>::iter_type
+typename money_get<_CharT, _InputIter>::iter_type
 money_get<_CharT, _InputIter>::
 _C_get (iter_type __it, iter_type __end, bool __intl, ios_base &__flags,
         _RWSTD_IOSTATE &__err, void *__pval, string_type *__pstr) const
@@ -86,7 +86,7 @@
     char __buf [304];
     char *__pcur = __buf;
 
-    typedef _TYPENAME string_type::traits_type _Traits;
+    typedef typename string_type::traits_type _Traits;
 
     char __grpbuf [sizeof __buf];    // holds sizes of discovered groups
     char       *__pgrp = __grpbuf;   // current group
diff --git a/include/loc/_money_get.h b/include/loc/_money_get.h
index 197e7b5..eb792fd 100644
--- a/include/loc/_money_get.h
+++ b/include/loc/_money_get.h
@@ -58,7 +58,7 @@
     basic_string<char_type, char_traits<char_type>, allocator<char_type> >
     string_type;
 
-    _EXPLICIT money_get (_RWSTD_SIZE_T __ref = 0)
+    explicit money_get (_RWSTD_SIZE_T __ref = 0)
         : _RW::__rw_facet (__ref) { }
 
     iter_type get (iter_type __begin, iter_type __end, bool __intl,
diff --git a/include/loc/_money_put.cc b/include/loc/_money_put.cc
index 5ccf9b9..059fe79 100644
--- a/include/loc/_money_put.cc
+++ b/include/loc/_money_put.cc
@@ -52,7 +52,7 @@
 
 
 template <class _CharT, class _OutputIter>
-/* private */ _TYPENAME money_put<_CharT, _OutputIter>::iter_type
+/* private */ typename money_put<_CharT, _OutputIter>::iter_type
 money_put<_CharT, _OutputIter>::
 _C_put (iter_type __it, int __opts, ios_base &__flags, char_type __fill,
         const char_type *__s, _RWSTD_SIZE_T __n, int __fd,
@@ -284,7 +284,7 @@
 
 
 template <class _CharT, class _OutputIter>
-/* virtual */ _TYPENAME money_put<_CharT, _OutputIter>::iter_type
+/* virtual */ typename money_put<_CharT, _OutputIter>::iter_type
 money_put<_CharT, _OutputIter>::
 do_put (iter_type __i, bool __intl, ios_base &__flags, char_type __fill,
         long double __val) const
@@ -334,7 +334,7 @@
 
 
 template <class _CharT, class _OutputIter>
-/* virtual */ _TYPENAME money_put<_CharT, _OutputIter>::iter_type
+/* virtual */ typename money_put<_CharT, _OutputIter>::iter_type
 money_put<_CharT, _OutputIter>::
 do_put (iter_type __i, bool __intl, ios_base &__flags, char_type __fill,
         const string_type &__str) const
@@ -365,7 +365,7 @@
     _RWSTD_SIZE_T  __strdigs = 0;          // number of digits in `str'
 
     typedef string::traits_type                   _Traits;
-    typedef _TYPENAME string_type::const_iterator _StringIter;
+    typedef typename string_type::const_iterator _StringIter;
 
     char        __buf [304];            // buffer for groups
     static char __nul    = '\0';        // `groups' must be non-0
diff --git a/include/loc/_money_put.h b/include/loc/_money_put.h
index ff086e1..a2b433c 100644
--- a/include/loc/_money_put.h
+++ b/include/loc/_money_put.h
@@ -60,7 +60,7 @@
     basic_string<char_type, char_traits<char_type>, allocator<char_type> >
     string_type;
 
-    _EXPLICIT money_put (_RWSTD_SIZE_T __ref = 0)
+    explicit money_put (_RWSTD_SIZE_T __ref = 0)
         : _RW::__rw_facet (__ref) { }
 
     // 22.2.6.2.1, p1
diff --git a/include/loc/_moneypunct.h b/include/loc/_moneypunct.h
index f896825..160c420 100644
--- a/include/loc/_moneypunct.h
+++ b/include/loc/_moneypunct.h
@@ -65,7 +65,7 @@
     basic_string<char_type, char_traits<char_type>, allocator<char_type> >
     string_type;
 
-    _EXPLICIT moneypunct (_RWSTD_SIZE_T __refs = 0)
+    explicit moneypunct (_RWSTD_SIZE_T __refs = 0)
         : _RW::__rw_facet (__refs) { }
 
     char_type decimal_point () const {
@@ -207,7 +207,7 @@
 
 public:
 
-    _EXPLICIT moneypunct_byname (const char *__name, _RWSTD_SIZE_T __ref = 0)
+    explicit moneypunct_byname (const char *__name, _RWSTD_SIZE_T __ref = 0)
         : moneypunct<_CharT, _Intl>(__ref) {
             this->_C_set_name (__name, _C_namebuf, sizeof _C_namebuf);
         }
diff --git a/include/loc/_num_get.cc b/include/loc/_num_get.cc
index 1cb4439..60fadfb 100644
--- a/include/loc/_num_get.cc
+++ b/include/loc/_num_get.cc
@@ -64,7 +64,7 @@
 #ifndef _RWSTD_NO_EXT_NUM_GET
 
 template <class _CharT, class _InputIter>
-_TYPENAME num_get<_CharT, _InputIter>::iter_type
+typename num_get<_CharT, _InputIter>::iter_type
 num_get<_CharT, _InputIter>::
 get (iter_type __begin, iter_type __end, ios_base &__flags, 
      _RWSTD_IOSTATE &__err, short &__val) const
@@ -83,7 +83,7 @@
 
 
 template <class _CharT, class _InputIter>
-_TYPENAME num_get<_CharT, _InputIter>::iter_type
+typename num_get<_CharT, _InputIter>::iter_type
 num_get<_CharT, _InputIter>::
 get (iter_type __begin, iter_type __end, ios_base &__flags, 
      _RWSTD_IOSTATE &__err, int &__val) const
@@ -106,7 +106,7 @@
 #ifndef _RWSTD_NO_NATIVE_BOOL
 
 template <class _CharT, class _InputIter /* = istreambuf_iterator<_CharT> */>
-_TYPENAME num_get<_CharT, _InputIter>::iter_type
+typename num_get<_CharT, _InputIter>::iter_type
 num_get<_CharT, _InputIter>::
 do_get (iter_type __begin, iter_type __end, ios_base &__flags,
         _RWSTD_IOSTATE &__err, bool &__val) const
@@ -172,7 +172,7 @@
 
 
 template <class _CharT, class _InputIter /* = istreambuf_iterator<_CharT> */>
-_TYPENAME num_get<_CharT, _InputIter>::iter_type
+typename num_get<_CharT, _InputIter>::iter_type
 num_get<_CharT, _InputIter>::
 _C_get (iter_type __begin, iter_type __end, ios_base &__flags,
         _RWSTD_IOSTATE &__err, int __type, void *__pval) const
diff --git a/include/loc/_num_get.h b/include/loc/_num_get.h
index 09f76f7..3533910 100644
--- a/include/loc/_num_get.h
+++ b/include/loc/_num_get.h
@@ -58,7 +58,7 @@
 
     static _RW::__rw_facet_id id;
 
-    _EXPLICIT num_get (_RWSTD_SIZE_T __refs = 0)
+    explicit num_get (_RWSTD_SIZE_T __refs = 0)
         : _RW::__rw_facet (__refs) { }
 
 #ifndef _RWSTD_NO_NATIVE_BOOL
diff --git a/include/loc/_num_put.cc b/include/loc/_num_put.cc
index d676c4a..e37a765 100644
--- a/include/loc/_num_put.cc
+++ b/include/loc/_num_put.cc
@@ -70,7 +70,7 @@
 
 
 template <class _CharT, class _OutputIter /* = ostreambuf_iterator<_CharT> */>
-_TYPENAME num_put<_CharT, _OutputIter>::iter_type
+typename num_put<_CharT, _OutputIter>::iter_type
 num_put<_CharT, _OutputIter>::
 _C_put (iter_type __it, ios_base &__flags, char_type __fill, int __type,
         const void *__pval) const
diff --git a/include/loc/_num_put.h b/include/loc/_num_put.h
index ab2f264..cffd822 100644
--- a/include/loc/_num_put.h
+++ b/include/loc/_num_put.h
@@ -56,7 +56,7 @@
     typedef _CharT      char_type;
     typedef _OutputIter iter_type;
 
-    _EXPLICIT num_put (_RWSTD_SIZE_T __refs = 0)
+    explicit num_put (_RWSTD_SIZE_T __refs = 0)
         : _RW::__rw_facet (__refs) { }
 
     virtual ~num_put ();
diff --git a/include/loc/_numpunct.h b/include/loc/_numpunct.h
index c37bcff..e5ab5be 100644
--- a/include/loc/_numpunct.h
+++ b/include/loc/_numpunct.h
@@ -60,7 +60,7 @@
     basic_string<char_type, char_traits<char_type>, allocator<char_type> >
     string_type;
 
-    _EXPLICIT numpunct (_RWSTD_SIZE_T __ref = 0)
+    explicit numpunct (_RWSTD_SIZE_T __ref = 0)
         : _RW::__rw_facet (__ref), _C_flags (0) { }
 
     virtual ~numpunct ();
@@ -136,7 +136,7 @@
 
 
 template <class _CharT>
-inline _TYPENAME numpunct<_CharT>::char_type
+inline typename numpunct<_CharT>::char_type
 numpunct<_CharT>::decimal_point () const
 {
     if (!(_C_flags & _RW::__rw_dp)) {
@@ -154,7 +154,7 @@
 
 
 template <class _CharT>
-inline _TYPENAME numpunct<_CharT>::char_type
+inline typename numpunct<_CharT>::char_type
 numpunct<_CharT>::thousands_sep () const
 {
     if (!(_C_flags & _RW::__rw_ts)) {
@@ -189,7 +189,7 @@
 
 
 template <class _CharT>
-inline _TYPENAME numpunct<_CharT>::string_type
+inline typename numpunct<_CharT>::string_type
 numpunct<_CharT>::truename () const
 {
     if (!(_C_flags & _RW::__rw_tn)) {
@@ -207,7 +207,7 @@
 
 
 template <class _CharT>
-inline _TYPENAME numpunct<_CharT>::string_type
+inline typename numpunct<_CharT>::string_type
 numpunct<_CharT>::falsename () const
 {
     if (!(_C_flags & _RW::__rw_fn)) {
@@ -234,7 +234,7 @@
 
 public:
 
-    _EXPLICIT numpunct_byname (const char *__name, _RWSTD_SIZE_T __refs = 0)
+    explicit numpunct_byname (const char *__name, _RWSTD_SIZE_T __refs = 0)
         : numpunct<_CharT>(__refs) {
         this->_C_set_name (__name, _C_namebuf, sizeof _C_namebuf);
     }
diff --git a/include/loc/_time_get.cc b/include/loc/_time_get.cc
index 4a3b648..62bc2b7 100644
--- a/include/loc/_time_get.cc
+++ b/include/loc/_time_get.cc
@@ -51,7 +51,7 @@
 
 
 template <class _CharT, class _InputIter>
-_TYPENAME time_get<_CharT, _InputIter>::iter_type
+typename time_get<_CharT, _InputIter>::iter_type
 time_get<_CharT, _InputIter>::
 get (iter_type __it, iter_type __end, ios_base &__fl, _RWSTD_IOSTATE &__err,
      tm *__tmb, const char_type *__pat, const char_type *__pat_end) const
@@ -121,7 +121,7 @@
 
 
 template <class _CharT, class _InputIter>
-/* virtual */ _TYPENAME time_get<_CharT, _InputIter>::iter_type
+/* virtual */ typename time_get<_CharT, _InputIter>::iter_type
 time_get<_CharT, _InputIter>::
 do_get (iter_type __it, iter_type __end, ios_base &__fl,
         _RWSTD_IOSTATE &__err, tm *__tmb,
diff --git a/include/loc/_time_get.h b/include/loc/_time_get.h
index 2c7fcd4..5f943ff 100644
--- a/include/loc/_time_get.h
+++ b/include/loc/_time_get.h
@@ -72,7 +72,7 @@
     typedef _CharT                         char_type;
     typedef _InputIter                     iter_type;
 
-    _EXPLICIT time_get (_RWSTD_SIZE_T __ref = 0)
+    explicit time_get (_RWSTD_SIZE_T __ref = 0)
         : _RW::__rw_facet (__ref) { }
 
     dateorder date_order() const { 
@@ -203,7 +203,7 @@
 
 public:
 
-    _EXPLICIT time_get_byname (const char *__name, _RWSTD_SIZE_T __ref = 0)
+    explicit time_get_byname (const char *__name, _RWSTD_SIZE_T __ref = 0)
         : time_get<_CharT, _InputIter>(__ref) {
         this->_C_set_name (__name, _C_namebuf, sizeof _C_namebuf);
     }
diff --git a/include/loc/_time_put.cc b/include/loc/_time_put.cc
index fef434d..bc2f42b 100644
--- a/include/loc/_time_put.cc
+++ b/include/loc/_time_put.cc
@@ -61,7 +61,7 @@
 
 
 template <class _CharT, class _OutputIter /* = ostreambuf_iterator<_CharT> */ >
-/* virtual */ _TYPENAME time_put<_CharT, _OutputIter>::iter_type
+/* virtual */ typename time_put<_CharT, _OutputIter>::iter_type
 time_put<_CharT, _OutputIter>::
 do_put (iter_type __it, ios_base &__flags, char_type __fill,
         const tm *__tmb, char __fmt, char __modifier /* = 0 */) const
@@ -98,7 +98,7 @@
 
 
 template <class _CharT, class _OutputIter /* = ostreambuf_iterator<_CharT> */ >
-_TYPENAME time_put<_CharT, _OutputIter>::iter_type
+typename time_put<_CharT, _OutputIter>::iter_type
 time_put<_CharT, _OutputIter>::
 put (iter_type __it, ios_base &__flags, char_type __fill, const tm *__tmb,
      const char_type *__pat, const char_type *__end) const
diff --git a/include/loc/_time_put.h b/include/loc/_time_put.h
index 90de597..c63f468 100644
--- a/include/loc/_time_put.h
+++ b/include/loc/_time_put.h
@@ -58,7 +58,7 @@
     typedef _CharT      char_type;
     typedef _OutputIter iter_type;
 
-    _EXPLICIT time_put (_RWSTD_SIZE_T __refs = 0)
+    explicit time_put (_RWSTD_SIZE_T __refs = 0)
         : _RW::__rw_facet (__refs) { }
 
     // 22.2.5.3.1, p1
@@ -102,7 +102,7 @@
 
 public:
 
-    _EXPLICIT time_put_byname (const char *__name, _RWSTD_SIZE_T __ref = 0)
+    explicit time_put_byname (const char *__name, _RWSTD_SIZE_T __ref = 0)
         : time_put<_CharT, _OutputIter>(__ref) {
         this->_C_set_name (__name, _C_namebuf, sizeof _C_namebuf);
     }
diff --git a/include/map b/include/map
index 837eab6..7094c44 100644
--- a/include/map
+++ b/include/map
@@ -90,16 +90,16 @@
 
 public:
 
-    typedef _TYPENAME _C_repT::reference              reference;
-    typedef _TYPENAME _C_repT::const_reference        const_reference;
-    typedef _TYPENAME _C_repT::iterator               iterator;
-    typedef _TYPENAME _C_repT::const_iterator         const_iterator;
-    typedef _TYPENAME _C_repT::size_type              size_type;
-    typedef _TYPENAME _C_repT::difference_type        difference_type;
-    typedef _TYPENAME _C_repT::pointer                pointer;
-    typedef _TYPENAME _C_repT::const_pointer          const_pointer;
-    typedef _TYPENAME _C_repT::reverse_iterator       reverse_iterator;
-    typedef _TYPENAME _C_repT::const_reverse_iterator const_reverse_iterator;
+    typedef typename _C_repT::reference              reference;
+    typedef typename _C_repT::const_reference        const_reference;
+    typedef typename _C_repT::iterator               iterator;
+    typedef typename _C_repT::const_iterator         const_iterator;
+    typedef typename _C_repT::size_type              size_type;
+    typedef typename _C_repT::difference_type        difference_type;
+    typedef typename _C_repT::pointer                pointer;
+    typedef typename _C_repT::const_pointer          const_pointer;
+    typedef typename _C_repT::reverse_iterator       reverse_iterator;
+    typedef typename _C_repT::const_reverse_iterator const_reverse_iterator;
 
     struct value_compare: binary_function<value_type, value_type, bool> {
         // explicitly specified template arg-list below
@@ -118,7 +118,7 @@
     };
 
     // 23.3.1.1, p1
-    _EXPLICIT
+    explicit
     map (const key_compare &__cmp   = key_compare (),
          const allocator_type &__alloc = allocator_type ()) 
         : _C_rep (__cmp, __alloc) { }
@@ -298,16 +298,16 @@
 
 public:
 
-    typedef _TYPENAME _C_repT::reference              reference;
-    typedef _TYPENAME _C_repT::const_reference        const_reference;
-    typedef _TYPENAME _C_repT::iterator               iterator;
-    typedef _TYPENAME _C_repT::const_iterator         const_iterator; 
-    typedef _TYPENAME _C_repT::size_type              size_type;
-    typedef _TYPENAME _C_repT::difference_type        difference_type;
-    typedef _TYPENAME _C_repT::pointer                pointer;
-    typedef _TYPENAME _C_repT::const_pointer          const_pointer; 
-    typedef _TYPENAME _C_repT::reverse_iterator       reverse_iterator;
-    typedef _TYPENAME _C_repT::const_reverse_iterator const_reverse_iterator;
+    typedef typename _C_repT::reference              reference;
+    typedef typename _C_repT::const_reference        const_reference;
+    typedef typename _C_repT::iterator               iterator;
+    typedef typename _C_repT::const_iterator         const_iterator; 
+    typedef typename _C_repT::size_type              size_type;
+    typedef typename _C_repT::difference_type        difference_type;
+    typedef typename _C_repT::pointer                pointer;
+    typedef typename _C_repT::const_pointer          const_pointer; 
+    typedef typename _C_repT::reverse_iterator       reverse_iterator;
+    typedef typename _C_repT::const_reverse_iterator const_reverse_iterator;
 
     struct value_compare: binary_function<value_type, value_type, bool> {
         // explicitly specified template arg-list below
@@ -324,7 +324,7 @@
         value_compare (key_compare __cmp): comp (__cmp) { /* empty */ }
     };
 
-    _EXPLICIT
+    explicit
     multimap (const key_compare &__cmp = key_compare (),
               const allocator_type &__alloc = allocator_type ())
       : _C_rep (__cmp, __alloc) { }
diff --git a/include/ostream b/include/ostream
index 97e3af4..a5be815 100644
--- a/include/ostream
+++ b/include/ostream
@@ -63,14 +63,14 @@
 public:
     typedef _CharT                             char_type;
     typedef _Traits                            traits_type;
-    typedef _TYPENAME traits_type::int_type    int_type;
-    typedef _TYPENAME traits_type::pos_type    pos_type;
-    typedef _TYPENAME traits_type::off_type    off_type;
+    typedef typename traits_type::int_type    int_type;
+    typedef typename traits_type::pos_type    pos_type;
+    typedef typename traits_type::off_type    off_type;
       
     typedef basic_ios<char_type, traits_type>  ios_type;
 
     // 27.6.2.2, p1
-    _EXPLICIT basic_ostream (basic_streambuf<char_type, traits_type> *__sb) {
+    explicit basic_ostream (basic_streambuf<char_type, traits_type> *__sb) {
         this->init (__sb);
     }
 
@@ -89,7 +89,7 @@
     // 27.6.2.3
     struct sentry: _RW::__rw_guard {
 
-        _EXPLICIT
+        explicit
         sentry (basic_ostream<char_type, traits_type> &__strm)
             : _RW::__rw_guard (__strm.rdbuf () ? __strm._C_bufmutex () : 0),
               _C_strm (__strm), _C_ok (_C_strm._C_opfx ().good ()) { }
diff --git a/include/ostream.cc b/include/ostream.cc
index 5dc7148..1911fe7 100644
--- a/include/ostream.cc
+++ b/include/ostream.cc
@@ -112,7 +112,7 @@
 
 
 template<class _CharT, class _Traits>
-_TYPENAME basic_ostream<_CharT, _Traits>::pos_type
+typename basic_ostream<_CharT, _Traits>::pos_type
 basic_ostream<_CharT, _Traits>::tellp ()
 {
     _RWSTD_ASSERT (0 != this->rdbuf ());
diff --git a/include/queue b/include/queue
index 48dcd16..b1875c9 100644
--- a/include/queue
+++ b/include/queue
@@ -76,11 +76,11 @@
 public:
 
     typedef _Container                                container_type;
-    typedef _TYPENAME container_type::value_type      value_type;
-    typedef _TYPENAME container_type::size_type       size_type;
+    typedef typename container_type::value_type      value_type;
+    typedef typename container_type::size_type       size_type;
     // lwg issue 307: additional typedefs
-    typedef _TYPENAME container_type::reference       reference;
-    typedef _TYPENAME container_type::const_reference const_reference;
+    typedef typename container_type::reference       reference;
+    typedef typename container_type::const_reference const_reference;
 
 protected:
 
@@ -88,7 +88,7 @@
 
 public:
 
-    _EXPLICIT
+    explicit
     queue (const container_type &__c = container_type ())
         : c (__c) { }
 
@@ -174,17 +174,17 @@
 
 template<class _TypeT,
          class _Container = vector<_TypeT>,
-         class _Compare = less<_TYPENAME _Container::value_type> >
+         class _Compare = less<typename _Container::value_type> >
 class priority_queue
 {
 public:
 
     typedef _Container                                container_type;
-    typedef _TYPENAME container_type::value_type      value_type;
-    typedef _TYPENAME container_type::size_type       size_type;
+    typedef typename container_type::value_type      value_type;
+    typedef typename container_type::size_type       size_type;
     // lwg issue 307: additional typedefs
-    typedef _TYPENAME container_type::reference       reference;
-    typedef _TYPENAME container_type::const_reference const_reference;
+    typedef typename container_type::reference       reference;
+    typedef typename container_type::const_reference const_reference;
 
 protected:
 
@@ -193,7 +193,7 @@
 
 public:
 
-    _EXPLICIT
+    explicit
     priority_queue (const _Compare       &__cmp = _Compare (),
                     const container_type &__c   = container_type ())
         : c (__c), comp (__cmp) {
diff --git a/include/rw/_algobase.h b/include/rw/_algobase.h
index 936990f..d5b6afa 100644
--- a/include/rw/_algobase.h
+++ b/include/rw/_algobase.h
@@ -193,8 +193,8 @@
     // accommodate _FwdIter::operator*() that returns an rvalue that
     // doesn't bind to a non-const reference e.g., vector<bool>::reference
 
-    _TYPENAME iterator_traits<_FwdIter1>::reference __ref1 (*__a);
-    _TYPENAME iterator_traits<_FwdIter2>::reference __ref2 (*__b);
+    typename iterator_traits<_FwdIter1>::reference __ref1 (*__a);
+    typename iterator_traits<_FwdIter2>::reference __ref2 (*__b);
 
     _RW::__rw_swap (__ref1, __ref2);
 
diff --git a/include/rw/_allocator.h b/include/rw/_allocator.h
index 364ba7f..e380202 100644
--- a/include/rw/_allocator.h
+++ b/include/rw/_allocator.h
@@ -301,8 +301,8 @@
     typedef const value_type*                         const_pointer;
     typedef value_type&                               reference;
     typedef const value_type&                         const_reference;
-    typedef _TYPENAME allocator_type::size_type       size_type;
-    typedef _TYPENAME allocator_type::difference_type difference_type;
+    typedef typename allocator_type::size_type       size_type;
+    typedef typename allocator_type::difference_type difference_type;
 
 protected:
     allocator_type _C_alloc;
diff --git a/include/rw/_autoptr.h b/include/rw/_autoptr.h
index 90920d6..a36e4a5 100644
--- a/include/rw/_autoptr.h
+++ b/include/rw/_autoptr.h
@@ -96,8 +96,6 @@
 template <class _TypeT>
 class auto_ptr_ref 
 {
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
     template <class _TypeU>
     friend class auto_ptr;
 
@@ -107,16 +105,6 @@
     auto_ptr_ref (auto_ptr<_TypeU>& __rhs, const _TypeU* = 0) _THROWS (())
         : _C_ptr (_RWSTD_REINTERPRET_CAST (auto_ptr<_TypeT>&, __rhs)) { }
 
-#else   // if defined (_RWSTD_NO_MEMBER_TEMPLATES)
-
-public:
-
-    // useless, auto_ptr_ref necessary only for auto_ptr conversions
-    auto_ptr_ref (auto_ptr<_TypeT>& __rhs, const _TypeT* = 0) _THROWS (())
-        : _C_ptr (__rhs) { }
-
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
-
     // reference to the owning auto_ptr object
     auto_ptr<_TypeT>& _C_ptr;
 };
@@ -129,7 +117,7 @@
     typedef _TypeT element_type;
 
     // 20.4.5.1, p1
-    _EXPLICIT auto_ptr (element_type* __p = 0) _THROWS (())
+    explicit auto_ptr (element_type* __p = 0) _THROWS (())
      : _C_ptr (__p) { }
 
     // 20.4.5.1, p2
@@ -147,8 +135,6 @@
         delete _C_ptr;
     }
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
     // 20.4.5.1, p4
     template <class _TypeU>
     auto_ptr (auto_ptr<_TypeU>& __rhs) _THROWS (())
@@ -174,17 +160,8 @@
         return auto_ptr<_TypeU>(release ());
     }
 
-#else   // if defined (_RWSTD_NO_MEMBER_TEMPLATES)
-
-    // 20.4.5.3, p3 (limited to T == U)
-    operator auto_ptr_ref<_TypeT>() _THROWS (()) {
-        return auto_ptr_ref<_TypeT>(*this, _C_ptr);
-    }
-
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
-
     // 20.4.5.2, p1
-    _TYPENAME _RW::__rw_nonvoid_ref<element_type>::_C_ref
+    typename _RW::__rw_nonvoid_ref<element_type>::_C_ref
     operator* () const _THROWS (()) {
         _RWSTD_ASSERT (0 != get ());
         return *get (); 
diff --git a/include/rw/_basic_ios.h b/include/rw/_basic_ios.h
index 5948d20..c2cc92d 100644
--- a/include/rw/_basic_ios.h
+++ b/include/rw/_basic_ios.h
@@ -77,9 +77,9 @@
 
     typedef _CharT                          char_type;
     typedef _Traits                         traits_type;
-    typedef _TYPENAME traits_type::int_type int_type;
-    typedef _TYPENAME traits_type::pos_type pos_type;
-    typedef _TYPENAME traits_type::int_type off_type;
+    typedef typename traits_type::int_type int_type;
+    typedef typename traits_type::pos_type pos_type;
+    typedef typename traits_type::int_type off_type;
 
 protected:
 
@@ -90,7 +90,7 @@
 
     // 27.4.4.1, p1 - NOTE: `sb' may point to a yet uninitialized
     //  object; it is unsafe to reference any of its members
-    _EXPLICIT basic_ios (streambuf_type *__sb) {
+    explicit basic_ios (streambuf_type *__sb) {
         init (__sb);
     }
 
@@ -248,7 +248,7 @@
 
 
 template<class _CharT, class _Traits>
-inline _TYPENAME basic_ios<_CharT, _Traits>::char_type
+inline typename basic_ios<_CharT, _Traits>::char_type
 basic_ios<_CharT, _Traits>::fill () const
 {
     // delayed initialization used to allow objects of stream types other
@@ -263,7 +263,7 @@
 
 
 template<class _CharT, class _Traits>
-inline _TYPENAME basic_ios<_CharT, _Traits>::char_type
+inline typename basic_ios<_CharT, _Traits>::char_type
 basic_ios<_CharT, _Traits>::fill (char_type __ch)
 {
     // convert to int type before swapping
diff --git a/include/rw/_config-acc.h b/include/rw/_config-acc.h
index 3738083..71a05b7 100644
--- a/include/rw/_config-acc.h
+++ b/include/rw/_config-acc.h
@@ -104,3 +104,12 @@
 #  define _RWSTD_ATTRIBUTE_NORETURN __attribute__ ((noreturn))
 #endif   // aCC >= 6
 
+
+#if 60000 <= __HP_aCC
+#  define _RWSTD_TT_ALIGN_OF(T)    __alignof__(T)
+#  define _RWSTD_TT_MAX_ALIGNMENT  128
+#  define _RWSTD_TT_ALIGNED_POD(N) \
+      struct { unsigned char _C_align __attribute__ ((aligned ((N)))); }
+#endif // __HP_aCC >= 6.00
+
+
diff --git a/include/rw/_config-eccp.h b/include/rw/_config-eccp.h
index d5cb955..452647c 100644
--- a/include/rw/_config-eccp.h
+++ b/include/rw/_config-eccp.h
@@ -25,7 +25,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 2001-2007 Rogue Wave Software, Inc.
+ * Copyright 2001-2008 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -55,10 +55,6 @@
 #  define _RWSTD_NO_UNCAUGHT_EXCEPTION
 #endif   // _RWSTD_REENTRANT
 
-#ifndef _RWSTD_NO_MBSTATE_T
-#  define _RWSTD_NO_MBSTATE_T
-#endif   // _RWSTD_NO_MBSTATE_T
-
 #undef _RWSTD_NO_DEPRECATED_C_HEADERS
 #undef _RWSTD_NO_PURE_C_HEADERS
 
@@ -70,3 +66,38 @@
 #    define _RWSTD_NO_EXCEPTIONS
 #  endif   // _RWSTD_NO_EXCEPTIONS
 #endif   // __EXCEPTIONS
+
+#if (310 <= __EDG_VERSION__)
+#  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_POD(T)               __is_pod(T)
+
+#  define _RWSTD_TT_IS_EMPTY(T)             __is_empty(T)
+#  define _RWSTD_TT_IS_POLYMORPHIC(T)       __is_polymorphic(T)
+
+// __is_convertible_to() fails for decay and void-void conversions
+//#  define _RWSTD_TT_IS_CONVERTIBLE(T,U)     __is_convertible_to(T,U)
+#  define _RWSTD_TT_IS_ABSTRACT(T)          __is_abstract(T)
+
+// __is_base_of() gives false positives for union types
+//#  define _RWSTD_TT_IS_BASE_OF(T,U)         __is_base_of(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_MAX_ALIGNMENT           16
+
+// need to find a way to align data
+//#  define _RWSTD_TT_ALIGNED_POD(N)          struct { double _C_align; }
+#endif   // __EDG_VERSION__ >= 3.10 
+
diff --git a/include/rw/_config-gcc.h b/include/rw/_config-gcc.h
index e7b237d..95522ff 100644
--- a/include/rw/_config-gcc.h
+++ b/include/rw/_config-gcc.h
@@ -176,30 +176,39 @@
 #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_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_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_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_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_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_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
+#  define _RWSTD_TT_ALIGN_OF(T)             __alignof__(T)
+#  define _RWSTD_TT_MAX_ALIGNMENT           16
+#  define _RWSTD_TT_ALIGNED_POD(N) \
+     struct { unsigned char _C_align __attribute__ ((aligned ((N)))); }
+
+#  ifdef __GXX_EXPERIMENTAL_CXX0X__
+     // enable C++ 0x features disabled in builds
+     // configured without -std=c++0x or -std=gnu++0x
+
+     // C++ 0x features supported since 4.3.0
+#    undef _RWSTD_NO_VARIADIC_TEMPLATES
+#    undef _RWSTD_NO_RVALUE_REFERENCES
+#  endif
+
 #endif   // __GNUC__ >= 4.3
 
diff --git a/include/rw/_config-msvc.h b/include/rw/_config-msvc.h
index 469f1e1..7c8e55d 100644
--- a/include/rw/_config-msvc.h
+++ b/include/rw/_config-msvc.h
@@ -103,6 +103,7 @@
 #  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_POD(T)              __is_pod(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) 
@@ -110,15 +111,9 @@
 #  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
+#  define _RWSTD_TT_ALIGNED_POD(N)         \
+      struct {__declspec(align(Align)) unsigned char _C_align; }
 
-// __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)
-
+#  define _RWSTD_TT_MAX_ALIGNMENT          8192
 #endif // _MSC_FULL_VER >= 140050215
 
diff --git a/include/rw/_config-sunpro.h b/include/rw/_config-sunpro.h
index e034409..33f8c58 100644
--- a/include/rw/_config-sunpro.h
+++ b/include/rw/_config-sunpro.h
@@ -31,11 +31,6 @@
 
 // _REENTRANT defined by the -mt compiler option
 
-#if __SUNPRO_CC >= 0x530 && __SUNPRO_CC <= 0x540
-   // test fails due to a SunPro 5.3 bug (PR RW #26641/Sun #4526136)
-#  undef _RWSTD_NO_MEMBER_TEMPLATES
-#endif   // SunPro 5.3, 5.4
-
 #if __SUNPRO_CC <= 0x540
    // works around a partial specialization bug (PR #28119)
 #  ifndef _RWSTD_NO_EXT_CONST_ALLOCATOR
diff --git a/include/rw/_config.h b/include/rw/_config.h
index ae6eb4b..2efbbbf 100644
--- a/include/rw/_config.h
+++ b/include/rw/_config.h
@@ -495,9 +495,4 @@
 #  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
diff --git a/include/rw/_defs.h b/include/rw/_defs.h
index e44f8df..3a6f83c 100644
--- a/include/rw/_defs.h
+++ b/include/rw/_defs.h
@@ -494,20 +494,6 @@
 #endif // _RWSTD_NO_BOOL
 
 
-#ifndef _RWSTD_NO_TYPENAME
-#  define _TYPENAME   typename
-#else
-#  define _TYPENAME   /* empty */
-#endif
-
-
-#ifndef _RWSTD_NO_EXPLICIT
-#  define _EXPLICIT   explicit
-#else
-#  define _EXPLICIT   /* empty */
-#endif
-
-
 #ifndef _RWSTD_NO_EXPORT
 #  define _EXPORT   export
 #else
@@ -896,10 +882,10 @@
 #ifdef _RWSTD_ALLOCATOR
 #  ifndef _RWSTD_NO_DEPENDENT_TEMPLATE
 #    define _RWSTD_REBIND(from, to) \
-            _TYPENAME from::template rebind < to >::other
+            typename from::template rebind < to >::other
 #  else
 #    define _RWSTD_REBIND(from, to) \
-            _TYPENAME from:: rebind < to >::other
+            typename from:: rebind < to >::other
 #  endif   // _RWSTD_NO_DEPENDENT_TEMPLATE
 
 #  define _RWSTD_ALLOC_TYPE(Allocator, ignore)        \
@@ -1044,30 +1030,30 @@
 // _Iterator typedefs
 // (note that you must use a semi-colon at the end of this macro)
 #define _RWSTD_ITERATOR_TYPES(_Iterator)                               \
-     typedef _TYPENAME _Iterator::difference_type difference_type;     \
-     typedef _TYPENAME _Iterator::value_type value_type;               \
-     typedef _TYPENAME _Iterator::pointer pointer;                     \
-     typedef _TYPENAME _Iterator::reference reference;                 \
-     typedef _TYPENAME _Iterator::iterator_category iterator_category
+     typedef typename _Iterator::difference_type difference_type;     \
+     typedef typename _Iterator::value_type value_type;               \
+     typedef typename _Iterator::pointer pointer;                     \
+     typedef typename _Iterator::reference reference;                 \
+     typedef typename _Iterator::iterator_category iterator_category
 
 // helpers making working w/o iterator_traits transparent
 #ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC
 
 #  define _RWSTD_VALUE_TYPE(iterT) \
-       (_TYPENAME _STD::iterator_traits< iterT >::value_type*)0
+       (typename _STD::iterator_traits< iterT >::value_type*)0
 #  define _RWSTD_DIFFERENCE_TYPE(iterT)   \
-       (_TYPENAME _STD::iterator_traits< iterT >::difference_type*)0
+       (typename _STD::iterator_traits< iterT >::difference_type*)0
 
 #  if defined (SNI) || defined (__SUNPRO_CC) && __SUNPRO_CC <= 0x530
      // hacking around the inability of Siemens CDS++ and SunPro 5.3
      // to use the ctor syntax for type-dependent nested type names
 #    define _RWSTD_ITERATOR_CATEGORY(iterT, ignore) \
-         (const _TYPENAME _STD::iterator_traits< iterT >::iterator_category&) \
+         (const typename _STD::iterator_traits< iterT >::iterator_category&) \
          (_STD::forward_iterator_tag ())
 
 #  else
 #    define _RWSTD_ITERATOR_CATEGORY(iterT, ignore) \
-         _TYPENAME _STD::iterator_traits< iterT >::iterator_category ()
+         typename _STD::iterator_traits< iterT >::iterator_category ()
 #  endif
 
 #  define _RWSTD_REVERSE_ITERATOR(iterT, ign1, ign2, ign3) \
@@ -1560,9 +1546,6 @@
 #    ifndef _RWSTD_NO_SPECIALIZED_FACET_ID
 #      define _RWSTD_NO_SPECIALIZED_FACET_ID
 #    endif   // _RWSTD_NO_SPECIALIZED_FACET_ID
-#  else
-     // FIXME: handle the case when explicit member specialization
-     // is not available (e.g., MSVC 6)
 #  endif   // _RWSTD_NO_EXPLICIT_MEMBER_SPECIALIZATION
 #else   // if !defined (_RWSTD_NO_EXTERN_TEMPLATE)
    // no need to explicitly specialize the members when extern
@@ -1576,33 +1559,21 @@
 
 // configuration for container class templates and their member
 // function templates
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-   // member function template definitions outside the body
-   // of the parent container class template are enabled
 #  define _RWSTD_ASSIGN_RANGE(first, last, tag)     \
           _C_assign_range (first, last, tag)
 #  define _RWSTD_INSERT_RANGE(it, first, last, tag) \
           _C_insert_range (it, first, last, tag)
-#else
-   // when member function template definitions outside the body
-   // of the parent container class template are disabled, they
-   // are emulated using namespace-scope function templates
-#  define _RWSTD_ASSIGN_RANGE(first, last, tag)       \
-          __rw_assign_range (this, first, last, tag)
-#  define _RWSTD_INSERT_RANGE(it, first, last, tag)   \
-          __rw_insert_range (this, it, first, last, tag)
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
 
 
-#if defined (va_copy) || !defined _RWSTD_NO_VA_COPY
+#if 2 < __GNUG__
+   // use gcc builtin by default
+#  define _RWSTD_VA_COPY(va_dst, va_src) \
+          __builtin_va_copy (va_dst, va_src)
+#elif defined (va_copy) || !defined _RWSTD_NO_VA_COPY
    // either va_copy() is already #defined (because <stdarg.h>
    // is already #included), or it was detected at configuration
 #  define _RWSTD_VA_COPY(va_dst, va_src) \
           va_copy (va_dst, va_src)
-#elif 2 < __GNUG__
-   // no va_copy() macro detected, use gcc builtin
-#  define _RWSTD_VA_COPY(va_dst, va_src) \
-          __builtin_va_copy (va_dst, va_src)
 #elif defined (_RWSTD_NO_VA_LIST_ARRAY)
    // va_list is not an array, use ordinary assignment to copy
 #  define _RWSTD_VA_COPY(va_dst, va_src) \
@@ -1613,4 +1584,15 @@
           memcpy (va_dst, va_src, sizeof (va_list))
 #endif   // _RWSTD_NO_VA_LIST_ARRAY
 
+
+// disable aligned type traits if compiler support is not
+// configured
+#if    !defined (_RWSTD_TT_ALIGN_OF)    \
+    || !defined (_RWSTD_TT_ALIGNED_POD) \
+    || !defined (_RWSTD_TT_MAX_ALIGNMENT)
+#  ifndef _RWSTD_NO_ALIGN_TRAITS
+#    define _RWSTD_NO_ALIGN_TRAITS
+#  endif
+#endif
+
 #endif   // _RWSTD_RW_DEFS_H_INCLUDED
diff --git a/include/rw/_exception.h b/include/rw/_exception.h
index 66280fd..88661bc 100644
--- a/include/rw/_exception.h
+++ b/include/rw/_exception.h
@@ -69,9 +69,9 @@
 
     __rw_exception (const __rw_exception&);
 
-    _EXPLICIT __rw_exception (const _STD::string&);
+    explicit __rw_exception (const _STD::string&);
     
-    _EXPLICIT __rw_exception (const char*);
+    explicit __rw_exception (const char*);
 
     virtual ~__rw_exception () _THROWS (());
 
diff --git a/include/rw/_forward.h b/include/rw/_forward.h
index 282391b..2259ace 100644
--- a/include/rw/_forward.h
+++ b/include/rw/_forward.h
@@ -3,7 +3,10 @@
  *
  * _forward - forward/move helpers for <utility> header
  *
- * $Id$
+ * This is an internal header file used to implement the C++ Standard
+ * Library. It should never be #included directly by a program.
+ *
+ * $Id: _forward.h 675429 2008-07-10 03:42:40Z sebor $
  *
  ***************************************************************************
  *
@@ -23,7 +26,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 2008 Rogue Wave Software.
+ * Copyright 2008 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -31,98 +34,56 @@
 #  define _RWSTD_RW_FORWARD_INCLUDED
 
 #  include <rw/_defs.h>
-
-#  if !defined _RWSTD_NO_EXT_CXX_0X
-
-#    include <rw/_meta_ref.h>   // for __rw_remove_reference
+#  include <rw/_meta_ref.h>     // for __rw_remove_reference
 
 
 _RWSTD_NAMESPACE (std) {
 
 
-// [20.2.2]  forward/move helpers
+// 20.2.2, forward/move helpers:
 
-/**
- * An identity wrapper.  Similar to the identity property, the identity
- * wrapper is a class template that simply reflects the type of its
- * template parameter.  This class template is used when a template
- * parameter type must be explicitly specified in order to apply the
- * correct move/forwarding semantics, usually in the \c std::forward()
- * function.
- *
- * @tparam _Type Any type.  No restrictions or requirements.
- * @see std::forward
- */
-template <class _Type>
+template <class _TypeT>
 struct identity
 {
-    /** Identifies template parameter type. */
-    typedef _Type type;
+    typedef _TypeT  type;
 
-    /**
-     * Conversion operator.  This operator converts the parameter value
-     * to the wrapped identity type.
-     *
-     * @param __x An value convertible to identity type.
-     * @return Same value as the function argument with identity type.
-     */
-    const _Type& operator() (const _Type& __x) const {
+    const type& operator() (const type& __x) const {
         return __x;
     }
 };
 
+#  define _RWSTD_IDENTITY(_TypeT)         _STD::identity<_TypeT>::type
 
-#    if !defined _RWSTD_NO_RVALUE_REFERENCES
 
-/**
- * Forwards appropriate rvalue or lvalue reference type.  This function
- * is used to ensure that the appropriate reference type is used in move
- * semantics.
- *
- * @tparam _Type An lvalue or rvalue reference type.
- * @param __x An lvalue reference or rvalue reference.
- * @return An lvalue if __x is an lvalue reference; otherwise, an rvalue.
- */
-_EXPORT
-template <class _Type>
-_Type&&
-forward (_TYPENAME identity<_Type>::type&& __x)
+#  if !defined _RWSTD_NO_RVALUE_REFERENCES
+
+template <class _TypeT>
+inline _TypeT&&
+forward (typename identity<_TypeT>::type&& __x)
 {
     return __x;
 }
 
-/**
- * Move a value to an rvalue reference.  This function is used to
- * explicitly bind constructors and other functions with rvalue
- * references that employ move semantics.
- *
- * @tparam _Type Any type.  No requirements or restrictions.
- * @param __x An lvalue or rvalue.
- * @return Same value as parameter with rvalue reference type.
- */
-_EXPORT
-template <class _Type>
-_TYPENAME _RW::__rw_remove_reference<_Type>::type&&
-move (_Type&& __x)
+
+template <class _TypeT>
+inline typename _RWSTD_REMOVE_REFERENCE(_TypeT)&&
+move (_TypeT&& __x)
 {
     return __x;
 }
 
-/**
- * @internal
- * Internal wrapper macro to utilize move semantics if available.
- * @param __x An lvalue or rvalue.
- */
-#      define _RWSTD_MOVE(__x)   std::move (__x)
-#    else   // no rvalue references
-#      define _RWSTD_MOVE(__x)   (__x)
+#    define _RWSTD_FORWARD(_TypeT, __x)   _STD::forward<_TypeT> (__x)
+#    define _RWSTD_MOVE(__x)              _STD::move (__x)
 
-#    endif   // !defined _RWSTD_NO_RVALUE_REFERENCES
+#  else   // no rvalue references
+
+#    define _RWSTD_FORWARD(_TypeT, __x)   (__x)
+#    define _RWSTD_MOVE(__x)              (__x)
+
+#  endif   // !defined _RWSTD_NO_RVALUE_REFERENCES
 
 
 }   // namespace std
 
 
-#  endif   // !defined _RWSTD_NO_EXT_CXX_0X
-
 #endif   // _RWSTD_RW_FORWARD_INCLUDED
diff --git a/include/rw/_funcbase.h b/include/rw/_funcbase.h
index 5aae733..4a5be87 100644
--- a/include/rw/_funcbase.h
+++ b/include/rw/_funcbase.h
@@ -61,8 +61,8 @@
 
 
 #define _RWSTD_UNARY_FUNCTION_TYPES(T, U)                                    \
-  typedef _TYPENAME _STD::unary_function<T, U>::argument_type argument_type; \
-  typedef _TYPENAME _STD::unary_function<T, U>::result_type   result_type
+  typedef typename _STD::unary_function<T, U>::argument_type argument_type; \
+  typedef typename _STD::unary_function<T, U>::result_type   result_type
 
 
 template <class _Arg1, class _Arg2, class _Result>
@@ -75,11 +75,11 @@
 
 
 #define _RWSTD_BINARY_FUNCTION_TYPES(T, U, V)                              \
-  typedef _TYPENAME _STD::binary_function<T, U, V>::second_argument_type   \
+  typedef typename _STD::binary_function<T, U, V>::second_argument_type   \
           second_argument_type;                                            \
-  typedef _TYPENAME _STD::binary_function<T, U, V>::first_argument_type    \
+  typedef typename _STD::binary_function<T, U, V>::first_argument_type    \
           first_argument_type;                                             \
-  typedef _TYPENAME _STD::binary_function<T, U, V>::result_type            \
+  typedef typename _STD::binary_function<T, U, V>::result_type            \
           result_type
 
 
diff --git a/include/rw/_ioinsert.cc b/include/rw/_ioinsert.cc
index 090038e..896970e 100644
--- a/include/rw/_ioinsert.cc
+++ b/include/rw/_ioinsert.cc
@@ -39,7 +39,7 @@
 __rw_insert (_STD::basic_ostream<_CharT, _Traits> &__strm,
              _NativeType                           __val)
 {
-    const _TYPENAME _STD::basic_ostream<_CharT, _Traits>::sentry
+    const typename _STD::basic_ostream<_CharT, _Traits>::sentry
         __opfx (__strm);
 
     _TRY {
@@ -75,7 +75,7 @@
     _RWSTD_ASSERT (!__len || __len > 0 && 0 != __s);
 
     if (1 == __len) {
-        typedef _TYPENAME _Traits::int_type _IntT;
+        typedef typename _Traits::int_type _IntT;
 
         const _IntT __ic = __strm.rdbuf ()->sputc (*__s);
 
@@ -100,7 +100,7 @@
 
     for (_RWSTD_STREAMSIZE __i = 0; __i < __len; ++__i) {
 
-        typedef _TYPENAME _Traits::int_type _IntT;
+        typedef typename _Traits::int_type _IntT;
 
         const _IntT __ic = __strm.rdbuf ()->sputc (__ctp.widen (__s [__i]));
 
@@ -133,7 +133,7 @@
 
     _TRY {
   
-        const _TYPENAME _STD::basic_ostream<_CharT, _Traits>::sentry
+        const typename _STD::basic_ostream<_CharT, _Traits>::sentry
             __opfx (__strm);
 
         if (__opfx) {
@@ -142,8 +142,8 @@
             // according to the rules described in 22.2.2.2.2, p19
             const _RWSTD_STREAMSIZE __pad = __width - __len;
 
-            typedef _TYPENAME
-                __rw_is_same<_CharT, _StringT>::_C_type _Same;
+            typedef typename
+                __rw_same_type<_CharT, _StringT>::_C_type _Same;
 
             if (__pad > 0) {
                 const int __padbits =
diff --git a/include/rw/_ioiter.h b/include/rw/_ioiter.h
index ba20eb5..5493a82 100644
--- a/include/rw/_ioiter.h
+++ b/include/rw/_ioiter.h
@@ -59,11 +59,11 @@
 template <class _CharT, class _Traits>
 struct istreambuf_iterator
     : iterator<input_iterator_tag, _CharT, 
-               _TYPENAME _Traits::off_type, _CharT*, _CharT&>
+               typename _Traits::off_type, _CharT*, _CharT&>
 {
     typedef _CharT                                  char_type;
     typedef _Traits                                 traits_type;
-    typedef _TYPENAME traits_type::int_type         int_type;
+    typedef typename traits_type::int_type         int_type;
     typedef basic_streambuf<char_type, traits_type> streambuf_type;
     typedef basic_istream<char_type, traits_type>   istream_type;
 
@@ -135,7 +135,7 @@
 
 
 template <class _CharT, class _Traits>
-inline _TYPENAME istreambuf_iterator<_CharT, _Traits>::char_type
+inline typename istreambuf_iterator<_CharT, _Traits>::char_type
 istreambuf_iterator<_CharT, _Traits>::
 operator*() const
 {
@@ -161,7 +161,7 @@
 
 
 template <class _CharT, class _Traits>
-inline _TYPENAME istreambuf_iterator<_CharT, _Traits>::_C_proxy 
+inline typename istreambuf_iterator<_CharT, _Traits>::_C_proxy 
 istreambuf_iterator<_CharT, _Traits>::
 operator++(int)
 {
diff --git a/include/rw/_iosfailure.h b/include/rw/_iosfailure.h
index 4eed019..b2de946 100644
--- a/include/rw/_iosfailure.h
+++ b/include/rw/_iosfailure.h
@@ -45,11 +45,11 @@
 
 struct _RWSTD_EXPORT __rw_failure: __rw_exception
 {
-    _EXPLICIT __rw_failure (const _STD::string &__what)
+    explicit __rw_failure (const _STD::string &__what)
         : __rw_exception (__what) { }
 
     // extension
-    _EXPLICIT __rw_failure (const char *__what = 0)
+    explicit __rw_failure (const char *__what = 0)
         : __rw_exception (__what) { }
 
     virtual ~__rw_failure () _THROWS (());
diff --git a/include/rw/_iterator.h b/include/rw/_iterator.h
index 8f6947d..bad3bc8 100644
--- a/include/rw/_iterator.h
+++ b/include/rw/_iterator.h
@@ -62,7 +62,7 @@
 #  define _RWSTD_ITER_TEMPLATE template <class _Iterator>
 #  define _RWSTD_ITER_ID(i)    i <_Iterator>
 #  define _RWSTD_ITER_DIFF_TYPE(i, ignore)                             \
-          _TYPENAME iterator_traits<_Iterator>::difference_type
+          typename iterator_traits<_Iterator>::difference_type
 #else
 #  define _RWSTD_ITER_TEMPLATE                                         \
           template <class _Iterator, class _Category, class _TypeT,    \
@@ -77,18 +77,18 @@
 
 template <class _Iterator>
 class reverse_iterator
-    : public iterator<_TYPENAME iterator_traits<_Iterator>::iterator_category, 
-                      _TYPENAME iterator_traits<_Iterator>::value_type, 
-                      _TYPENAME iterator_traits<_Iterator>::difference_type,
-                      _TYPENAME iterator_traits<_Iterator>::pointer, 
-                      _TYPENAME iterator_traits<_Iterator>::reference>
+    : public iterator<typename iterator_traits<_Iterator>::iterator_category, 
+                      typename iterator_traits<_Iterator>::value_type, 
+                      typename iterator_traits<_Iterator>::difference_type,
+                      typename iterator_traits<_Iterator>::pointer, 
+                      typename iterator_traits<_Iterator>::reference>
 {
     typedef iterator_traits<_Iterator>             traits_type;
 public:
-    typedef _TYPENAME traits_type::difference_type difference_type;
-    typedef _TYPENAME traits_type::value_type      value_type;
-    typedef _TYPENAME traits_type::pointer         pointer;
-    typedef _TYPENAME traits_type::reference       reference;
+    typedef typename traits_type::difference_type difference_type;
+    typedef typename traits_type::value_type      value_type;
+    typedef typename traits_type::pointer         pointer;
+    typedef typename traits_type::reference       reference;
 
 #else   // if defined (_RWSTD_NO_CLASS_PARTIAL_SPEC)
 
@@ -113,18 +113,17 @@
     reverse_iterator () { }
 
     // 24.4.1.3.1, p1
-    _EXPLICIT reverse_iterator (iterator_type __rhs) : current (__rhs) { }
+    explicit reverse_iterator (iterator_type __rhs) : current (__rhs) { }
  
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-#  ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC 
+#ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC 
 
     // 24.4.1.3.1, p2
     template <class _TypeU>
     reverse_iterator (const reverse_iterator<_TypeU>& __rhs)
         : current (__rhs.base ()) { }
 
-#  else   // if defined (_RWSTD_NO_CLASS_PARTIAL_SPEC)
+#else   // if defined (_RWSTD_NO_CLASS_PARTIAL_SPEC)
 
     // 24.4.1.3.1, p2
     template <class _Iterator2, class _Category2, class _TypeU,
@@ -133,8 +132,7 @@
                       _Reference2, _Pointer2, _Distance2>& __rhs)
         : current (__rhs.base ()) { }
 
-#  endif   // _RWSTD_NO_CLASS_PARTIAL_SPEC 
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
+#endif   // _RWSTD_NO_CLASS_PARTIAL_SPEC 
 
 
     // 24.4.1.3.2, p1
@@ -306,18 +304,17 @@
 
     __reverse_bi_iterator () { }
 
-    _EXPLICIT __reverse_bi_iterator (const iterator_type &__rhs) 
+    explicit __reverse_bi_iterator (const iterator_type &__rhs) 
         : current (__rhs) { }
 
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-#  ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC 
+#ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC 
 
       template <class _TypeU>
       __reverse_bi_iterator (const __reverse_bi_iterator<_TypeU>& __rhs)
           : current (__rhs.base ()) { }
 
-#  else   // if defined (_RWSTD_NO_CLASS_PARTIAL_SPEC )
+#else   // if defined (_RWSTD_NO_CLASS_PARTIAL_SPEC )
 
       template <class _Iterator2, class _Category2, class _TypeU,
                 class _Reference2, class _Pointer2, class _Distance2>
@@ -328,8 +325,7 @@
                                                          _Pointer2,
                                                          _Distance2>& __rhs)
           : current (__rhs.base ()) { }
-#  endif
-#endif // _RWSTD_NO_MEMBER_TEMPLATES
+#endif
 
 
     iterator_type base () const {
@@ -401,10 +397,10 @@
    // necessary to allow __iterator_category, __value_type, etc. to work
 #  define _RWSTD_INSERT_ITERATOR_BASE(cont)         \
           iterator<output_iterator_tag,             \
-                   _TYPENAME cont::value_type,      \
-                   _TYPENAME cont::difference_type, \
-                   _TYPENAME cont::pointer,         \
-                   _TYPENAME cont::reference>
+                   typename cont::value_type,      \
+                   typename cont::difference_type, \
+                   typename cont::pointer,         \
+                   typename cont::reference>
 #endif   // _RWSTD_NO_CLASS_PARTIAL_SPEC
 
 
@@ -414,11 +410,11 @@
 public:
     typedef _Container container_type;
 
-    _EXPLICIT back_insert_iterator (container_type& __rhs)
+    explicit back_insert_iterator (container_type& __rhs)
         : container (&__rhs) { }
 
     back_insert_iterator&
-    operator= (_TYPENAME container_type::const_reference __x) {
+    operator= (typename container_type::const_reference __x) {
         return container->push_back (__x), *this;
     }
 
@@ -453,11 +449,11 @@
 public:
     typedef _Container container_type;
 
-    _EXPLICIT front_insert_iterator (container_type& __rhs)
+    explicit front_insert_iterator (container_type& __rhs)
         : container (&__rhs) { }
 
     front_insert_iterator&
-    operator= (_TYPENAME container_type::const_reference __x) { 
+    operator= (typename container_type::const_reference __x) { 
         return container->push_front (__x), *this;
     }
 
@@ -493,11 +489,11 @@
     typedef _Container container_type;
 
     insert_iterator (container_type                    &__x,
-                     _TYPENAME container_type::iterator __it)
+                     typename container_type::iterator __it)
       : iter (__it), container (&__x) { }
 
     insert_iterator&
-    operator= (_TYPENAME container_type::const_reference __x) { 
+    operator= (typename container_type::const_reference __x) { 
         iter = container->insert (iter, __x);
         return ++iter, *this;
     }
@@ -516,7 +512,7 @@
 
 protected:
 
-    _TYPENAME container_type::iterator iter;
+    typename container_type::iterator iter;
     container_type*                    container;
 };
 
@@ -524,7 +520,7 @@
 template <class _Container, class _Iterator>
 inline insert_iterator<_Container> inserter (_Container& __x, _Iterator __it)
 {
-    typedef _TYPENAME _Container::iterator _Iter;
+    typedef typename _Container::iterator _Iter;
 
     return insert_iterator<_Container> (__x, _Iter (__it));
 }
diff --git a/include/rw/_iterbase.h b/include/rw/_iterbase.h
index 0109c67..a6fd6b0 100644
--- a/include/rw/_iterbase.h
+++ b/include/rw/_iterbase.h
@@ -57,11 +57,11 @@
 template <class _Iterator>
 struct iterator_traits
 {
-    typedef _TYPENAME _Iterator::value_type        value_type;
-    typedef _TYPENAME _Iterator::difference_type   difference_type;
-    typedef _TYPENAME _Iterator::pointer           pointer;
-    typedef _TYPENAME _Iterator::reference         reference;
-    typedef _TYPENAME _Iterator::iterator_category iterator_category;
+    typedef typename _Iterator::value_type        value_type;
+    typedef typename _Iterator::difference_type   difference_type;
+    typedef typename _Iterator::pointer           pointer;
+    typedef typename _Iterator::reference         reference;
+    typedef typename _Iterator::iterator_category iterator_category;
 };
 
 
@@ -128,7 +128,7 @@
 __iterator_category (const iterator<_Category, _TypeT,
                                     _Distance, _Pointer, _Reference>&)
 {
-    typedef _TYPENAME iterator<_Category, _TypeT, _Distance, _TypeT*,
+    typedef typename iterator<_Category, _TypeT, _Distance, _TypeT*,
                                _TypeT&>::iterator_category _IterCategory;
 
     return _IterCategory ();
@@ -187,7 +187,7 @@
 #ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC
 
 template <class _Iterator>
-inline _TYPENAME iterator_traits<_Iterator>::value_type*
+inline typename iterator_traits<_Iterator>::value_type*
 __value_type (const _Iterator*)
 { 
     return 0;
@@ -216,7 +216,7 @@
 #ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC
 
 template <class _Iterator>
-inline _TYPENAME iterator_traits<_Iterator>::difference_type*
+inline typename iterator_traits<_Iterator>::difference_type*
 __distance_type (_Iterator)
 { 
     return 0;
@@ -337,10 +337,10 @@
 
 // 24.3.4, p4
 template <class _ForwardIterator>
-inline _TYPENAME iterator_traits<_ForwardIterator>::difference_type
+inline typename iterator_traits<_ForwardIterator>::difference_type
 distance (_ForwardIterator __first, _ForwardIterator __last)
 {
-    _TYPENAME iterator_traits<_ForwardIterator>::difference_type __n = 0;
+    typename iterator_traits<_ForwardIterator>::difference_type __n = 0;
 
     __distance (__first, __last, __n,
                 _RWSTD_ITERATOR_CATEGORY (_ForwardIterator, __first));
@@ -408,11 +408,11 @@
 
 public:
 
-    typedef _TYPENAME traits_type::value_type         value_type;
-    typedef _TYPENAME traits_type::difference_type    difference_type;
-    typedef _TYPENAME traits_type::reference          reference;
-    typedef _TYPENAME traits_type::pointer            pointer;
-    typedef _TYPENAME traits_type::iterator_category  iterator_category;
+    typedef typename traits_type::value_type         value_type;
+    typedef typename traits_type::difference_type    difference_type;
+    typedef typename traits_type::reference          reference;
+    typedef typename traits_type::pointer            pointer;
+    typedef typename traits_type::iterator_category  iterator_category;
 
     typedef __rw_debug_iter <container_type, _MutableIterator,
                              _MutableIterator>        _C_mutable_iterator;
@@ -511,8 +511,7 @@
         return _C_iter;
     }
 
-#if    !defined (_RWSTD_NO_MEMBER_TEMPLATES) \
-    && (!defined (__IBMCPP__) || __IBMCPP__ > 502)
+#if !defined (__IBMCPP__) || __IBMCPP__ > 502
 
     // IBM xlC 5.0 fails to find these member template operators,
     // yet it complains about ambiguity if they are defined along
@@ -570,7 +569,7 @@
         return !(_C_iter < __rhs._C_iter);
     }
 
-#endif   // !_RWSTD_NO_MEMBER_TEMPLATES && __IBMCPP__ > 502
+#endif   // __IBMCPP__ > 502
 
     iterator_type         _C_iter;   // wrapped iterator
     const container_type *_C_cont;   // associated container
@@ -584,7 +583,7 @@
 
 
 #ifndef _RWSTD_NO_NONDEDUCED_CONTEXT
-# define _RWSTD_CONT_DIFF_TYPE _TYPENAME _Cont::difference_type 
+# define _RWSTD_CONT_DIFF_TYPE typename _Cont::difference_type 
 #else
 # define _RWSTD_CONT_DIFF_TYPE _RWSTD_PTRDIFF_T 
 #endif
@@ -600,8 +599,7 @@
 #undef _RWSTD_CONT_DIFF_TYPE 
 
 
-#if    defined (_RWSTD_NO_MEMBER_TEMPLATES)   \
-    || defined (__IBMCPP__) && __IBMCPP__ <= 502
+#if defined (__IBMCPP__) && __IBMCPP__ <= 502
 
 // IBM xlC 5.0 fails to find the member template operators
 // defined above in the presence of namespaces...
@@ -615,7 +613,7 @@
 // and non-const iterators, respectively (allows symmetry)
 
 template <class _Cont, class _Iter1, class _Iter2, class _MutIter>
-inline _TYPENAME _Cont::difference_type
+inline typename _Cont::difference_type
 operator- (const _RW::__rw_debug_iter<_Cont, _Iter1, _MutIter> &__x,
            const _RW::__rw_debug_iter<_Cont, _Iter2, _MutIter> &__y)
 {
@@ -672,7 +670,7 @@
     return __y < __x;
 }
 
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES && __IBMCPP__ <= 502
+#endif   // __IBMCPP__ <= 502
 
 }   // namespace std
 
diff --git a/include/rw/_meta_arr.h b/include/rw/_meta_arr.h
index 334a193..0be1023 100644
--- a/include/rw/_meta_arr.h
+++ b/include/rw/_meta_arr.h
@@ -34,74 +34,53 @@
 
 _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, _RWSTD_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.
- */
+#if !defined (__IBMCPP__) || (900 < __IBMCPP__)
+
 template <class _TypeT>
 struct __rw_remove_extent<_TypeT []>
 {
     typedef _TypeT type;
 };
 
-//#define _RWSTD_REMOVE_EXTENT(T) _RW::__rw_remove_extent<T>::type
+#endif
 
-/**
- * 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.
- */
+#define _RWSTD_REMOVE_EXTENT(T) _RW::__rw_remove_extent<T>::type
+
 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, _RWSTD_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.
- */
+#if !defined (__IBMCPP__) || (900 < __IBMCPP__)
+
 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
+#endif
+
+#define _RWSTD_REMOVE_ALL_EXTENTS(T) _RW::__rw_remove_all_extents<T>::type
 
 } // namespace __rw
 
diff --git a/include/rw/_meta_cat.h b/include/rw/_meta_cat.h
index ec319b2..c69479e 100644
--- a/include/rw/_meta_cat.h
+++ b/include/rw/_meta_cat.h
@@ -66,10 +66,6 @@
     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
 {
@@ -77,15 +73,9 @@
 
 _RWSTD_TRAIT_SPEC_0_CV(__rw_is_void, void, true);
 
-#define _RWSTD_IS_VOID(T)                                               \
-    _RW::__rw_is_void<T>::value
+#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
 {
@@ -117,14 +107,8 @@
 _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
+#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
 {
@@ -137,13 +121,9 @@
 _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
+#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
 {
@@ -154,18 +134,17 @@
 {
 };
 
+#if !defined (__IBMCPP__) || (900 < __IBMCPP__)
+
 template <class _TypeT>
 struct __rw_is_array<_TypeT []> : __rw_true_type
 {
 };
 
-#define _RWSTD_IS_ARRAY(T)                                            \
-    _RW::__rw_is_array<T>::value
+#endif
 
-/**
- * UnaryTypeTrait to determine if _TypeT is a (potentially cv-qualified)
- * pointer type.
- */
+#define _RWSTD_IS_ARRAY(T) _RW::__rw_is_array<T>::value
+
 template <class _TypeT>
 struct __rw_is_pointer : __rw_false_type
 {
@@ -173,13 +152,9 @@
 
 _RWSTD_TRAIT_SPEC_1_CV(__rw_is_pointer, _TypeT*, true);
 
-#define _RWSTD_IS_POINTER(T)                                          \
-    _RW::__rw_is_pointer<T>::value
+#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
 {
@@ -190,12 +165,10 @@
 {
 };
 
-#define _RWSTD_IS_LVAL_REF(T)                                         \
-    _RW::__rw_is_lval_ref<T>::value
+#define _RWSTD_IS_LVALUE_REFERENCE(T) \
+    _RW::__rw_is_lvalue_reference<T>::value
 
-/**
- * UnaryTypeTrait to determine if _TypeT is a rval reference type.
- */
+
 template <class _TypeT>
 struct __rw_is_rvalue_reference : __rw_false_type
 {
@@ -211,72 +184,133 @@
 
 #endif   // _RWSTD_NO_RVALUE_REFERENCES
 
-#define _RWSTD_IS_RVAL_REF(T)                                         \
-    _RW::__rw_is_rval_ref<T>::value
+#define _RWSTD_IS_RVALUE_REFERENCE(T) \
+    _RW::__rw_is_rvalue_reference<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)>
+struct __rw_is_class_or_union
 {
+    struct _C_no  { };
+    struct _C_yes { _C_no __pad[2]; };
+
+    template <class _TypeU>
+    static _C_yes _C_is (int, long _TypeU::*);
+
+    template <class _TypeU>
+    static _C_no  _C_is (int, ...);
+
+    enum { value =
+        sizeof (_C_yes) == sizeof (_C_is<_TypeT>(0, 0))
+    };
 };
 
-#define _RWSTD_IS_ENUM(T)                                             \
-    _RW::__rw_is_enum<T>::value
+#if defined (_RWSTD_TT_IS_UNION)
+#  define _RWSTD_IS_UNION(T) _RWSTD_TT_IS_UNION(T)
+#elif defined (_RWSTD_TT_IS_CLASS)
+#  define _RWSTD_IS_UNION(T)  \
+      _RW::__rw_is_class_or_union<T>::value && !_RWSTD_TT_IS_CLASS(T)
+#else
+#  define _RWSTD_IS_UNION(T) 0
+#endif
 
-/**
- * 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)>
+    : __rw_integral_constant<bool, _RWSTD_IS_UNION(_TypeT)>
 {
 };
 
-#define _RWSTD_IS_UNION(T)                                            \
-    _RW::__rw_is_union<T>::value
 
+#if defined (_RWSTD_TT_IS_CLASS)
+#  define _RWSTD_IS_CLASS(T) _RWSTD_TT_IS_CLASS(T)
+#elif defined (_RWSTD_TT_IS_UNION)
+#  define _RWSTD_IS_CLASS(T) \
+      _RW::__rw_is_class_or_union<T>::value && !_RWSTD_TT_IS_UNION(T)
+#else
+#  define _RWSTD_IS_CLASS(T) _RW::__rw_is_class_or_union<T>::value
+#endif
 
-/**
- * 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)>
+    : __rw_integral_constant<bool, _RWSTD_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.
- */
+#ifdef _RWSTD_TT_IS_ENUM
+#  define _RWSTD_IS_ENUM(T) _RWSTD_TT_IS_ENUM(T)
+#else
+
 template <class _TypeT, bool =    __rw_is_void<_TypeT>::value
                                || __rw_is_array<_TypeT>::value
+                               || __rw_is_integral<_TypeT>::value
+                               || __rw_is_floating_point<_TypeT>::value
                                || __rw_is_lvalue_reference<_TypeT>::value
-                               || __rw_is_rvalue_reference<_TypeT>::value>
+                               || __rw_is_rvalue_reference<_TypeT>::value
+                               || __rw_is_class_or_union<_TypeT>::value>
+struct __rw_is_enum_impl
+{
+    enum { _C_value = 0 };
+};
+
+template <class _TypeT>
+struct __rw_is_enum_impl<_TypeT, false>
+{
+    struct _C_no { };
+    struct _C_yes { _C_no __pad [2]; };
+
+    // supply first argument to prevent HP aCC warnings
+    static _C_no _C_is (int, ...);
+    static _C_yes _C_is (int, double);
+
+    static _TypeT& _C_make ();
+
+    enum {
+        _C_value = sizeof (_C_yes) == sizeof (_C_is (0, _C_make ()))
+    };
+};
+
+#  define _RWSTD_IS_ENUM(T) _RW::__rw_is_enum_impl<T>::_C_value
+#endif // !_RWSTD_TT_IS_ENUM
+
+template <class _TypeT>
+struct __rw_is_enum
+    : __rw_integral_constant<bool, _RWSTD_IS_ENUM(_TypeT)>
+{
+};
+
+
+
+#ifdef _RWSTD_TT_IS_FUNCTION
+#  define _RWSTD_IS_FUNCTION(T) _RWSTD_TT_IS_FUNCTION(T)
+#else
+
+//
+// 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.
+//
+template <class _TypeT, bool =    __rw_is_void<_TypeT>::value
+                               || __rw_is_array<_TypeT>::value
+                               || __rw_is_pointer<_TypeT>::value
+                               || __rw_is_lvalue_reference<_TypeT>::value
+                               || __rw_is_rvalue_reference<_TypeT>::value
+                               || __rw_is_class_or_union<_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.
- */
+//
+// 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
+// and member functions.
+//
 template <class _TypeT>
 struct __rw_is_function_impl<_TypeT, false>
 {
@@ -286,34 +320,26 @@
     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 _C_yes _C_is (_TypeT_Ptr);
+
+    template <class _TypeU>
+    static _C_no  _C_is (_TypeU);
 
     static _TypeT_Ref _C_make ();
 
-    enum { _C_value = sizeof (_C_yes) == sizeof (_C_is (0, _C_make ())) };
+    enum { _C_value = sizeof (_C_yes) == sizeof (_C_is (_C_make ())) };
 };
 
-/**
- * UnaryTypeTrait to determine if _TypeT is a function type.
- */
+#  define _RWSTD_IS_FUNCTION(T) _RW::__rw_is_function_impl<T>::_C_value
+#endif //_RWSTD_TT_IS_FUNCTION
+
 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
+    : __rw_integral_constant<bool, _RWSTD_IS_FUNCTION(_TypeT)>
 {
 };
 
-#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
 {
@@ -323,13 +349,10 @@
                        _TypeT _ClassT::*,
                        !__rw_is_function<_TypeT>::value);
 
-#define _RWSTD_IS_MEMOBJ_PTR(T)                                       \
+#define _RWSTD_IS_MEMBER_OBJECT_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
 {
@@ -339,7 +362,7 @@
                        _TypeT _ClassT::*,
                        __rw_is_function<_TypeT>::value);
 
-#define _RWSTD_IS_MEMFUN_PTR(T)                                       \
+#define _RWSTD_IS_MEMBER_FUNCTION_PTR(T) \
     _RW::__rw_is_member_function_pointer<T>::value
 
 #undef _RWSTD_TRAIT_SPEC_2_CV
diff --git a/include/rw/_meta_comp.h b/include/rw/_meta_comp.h
index 33b071a..62d4293 100644
--- a/include/rw/_meta_comp.h
+++ b/include/rw/_meta_comp.h
@@ -35,36 +35,26 @@
 
 _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>
+    : __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.
- */
+#define _RWSTD_IS_REFERENCE(T) _RW::__rw_is_reference<T>::value
+
 template <class _TypeT>
 struct __rw_is_arithmetic
-    : __rw_integral_constant<bool,    __rw_is_integral<_TypeT>::value
-                                   || __rw_is_floating_point<_TypeT>::value>
+    : __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.
- */
+#define _RWSTD_IS_ARITHMETIC(T) _RW::__rw_is_arithmetic<T>::value
+
 template <class _TypeT>
 struct __rw_is_fundamental
     : __rw_integral_constant<bool,    __rw_is_void<_TypeT>::value
@@ -72,13 +62,9 @@
 {
 };
 
+#define _RWSTD_IS_FUNDAMENTAL(T) _RW::__rw_is_fundamental<T>::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
@@ -87,27 +73,19 @@
 {
 };
 
-/**
- * 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.
- */
+#define _RWSTD_IS_OBJECT(T) _RW::__rw_is_object<T>::value
+
+
 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>
+    : __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.
- */
+#define _RWSTD_IS_MEMBER_POINTER(T) _RW::__rw_is_member_pointer<T>::value
+
 template <class _TypeT>
 struct __rw_is_scalar
     : __rw_integral_constant<bool,    __rw_is_arithmetic<_TypeT>::value
@@ -115,19 +93,14 @@
                                    || __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
-     */
+    // 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
- */
+#define _RWSTD_IS_SCALAR(T) _RW::__rw_is_scalar<T>::value
+
+
 template <class _TypeT>
 struct __rw_is_compound
     : __rw_integral_constant<bool,    __rw_is_array<_TypeT>::value
@@ -141,6 +114,9 @@
 {
 };
 
+#define _RWSTD_IS_COMPOUND(T) _RW::__rw_is_compound<T>::value
+
+
 } // namespace __rw
 
 
diff --git a/include/rw/_meta_cv.h b/include/rw/_meta_cv.h
index 9a3491e..2ab4ed7 100644
--- a/include/rw/_meta_cv.h
+++ b/include/rw/_meta_cv.h
@@ -36,54 +36,35 @@
 
 _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;
 };
 
+#define _RWSTD_REMOVE_CONST(T) _RW::__rw_remove_const<T>::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.
- */
+#define _RWSTD_REMOVE_VOLATILE(T) _RW::__rw_remove_volatile<T>::type
+
 template <class _TypeT>
 struct __rw_remove_cv
 {
@@ -92,6 +73,9 @@
     >::type type;
 };
 
+#define _RWSTD_REMOVE_CV(T) _RW::__rw_remove_cv<T>::type
+
+
 template <class _TypeT, bool =   __rw_is_function<_TypeT>::value
                               || __rw_is_reference<_TypeT>::value>
 struct __rw_add_const_impl
@@ -105,19 +89,14 @@
     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;
 };
 
+#define _RWSTD_ADD_CONST(T) _RW::__rw_add_const<T>::type
+
 
 template <class _TypeT, bool =   __rw_is_function<_TypeT>::value
                               || __rw_is_reference<_TypeT>::value>
@@ -132,22 +111,15 @@
     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.
- */
+#define _RWSTD_ADD_VOLATILE(T) _RW::__rw_add_volatile<T>::type
+
+
 template <class _TypeT>
 struct __rw_add_cv
 {
@@ -157,6 +129,8 @@
     >::type type;
 };
 
+#define _RWSTD_ADD_CV(T) _RW::__rw_add_cv<T>::type
+
 } // namespace __rw
 
 
diff --git a/include/rw/_meta_help.h b/include/rw/_meta_help.h
index bbbe1fa..859a4ac 100644
--- a/include/rw/_meta_help.h
+++ b/include/rw/_meta_help.h
@@ -34,27 +34,16 @@
 
 _RWSTD_NAMESPACE (__rw) {
 
-/**
- * @internal
- * A compile-time integral constant wrapper.  This class template
- * encapsulates an integer constant value for metaprogramming.
- */
+//
+// A compile-time integral constant wrapper. This class template
+// encapsulates an integer constant value for metaprogramming.
+//
 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;
 };
 
@@ -65,18 +54,20 @@
 
 #endif    // _RWSTD_NO_STATIC_CONST_MEMBER_DEFINITION
 
-/**
- * @internal
- * Synonym for __rw_integral_constant<bool, true> type.
- */
+//
+// Synonym for __rw_integral_constant<bool, true> type.
+//
 typedef __rw_integral_constant<bool, true>  __rw_true_type;
 
-/**
- * @internal
- * Synonym for __rw_integral_constant<bool, false> type.
- */
+//
+// Synonym for __rw_integral_constant<bool, false> type.
+//
 typedef __rw_integral_constant<bool, false> __rw_false_type;
 
+// convenience macros
+
+#define _RWSTD_BOOL_CONST(B) _RW::__rw_integral_constant<bool, B>
+
 } // namespace __rw
 
 
diff --git a/include/rw/_meta_other.h b/include/rw/_meta_other.h
index db4922a..f66e173 100644
--- a/include/rw/_meta_other.h
+++ b/include/rw/_meta_other.h
@@ -31,30 +31,23 @@
 #define _RWSTD_RW_META_OTHER_H_INCLUDED
 
 #include <rw/_defs.h>
+
 #include <rw/_meta_cat.h>
 #include <rw/_meta_ref.h>
+#include <rw/_meta_prop.h>
 #include <rw/_meta_ptr.h>
+#include <rw/_static_assert.h>
+
+#include <rw/_static_assert.h>
 
 _RWSTD_NAMESPACE (__rw) {
 
-/**
- * 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>
 {
@@ -64,155 +57,158 @@
 #define _RWSTD_CONDITIONAL(C,T,U) _RW::__rw_conditional<C,T,U>::type
 
 
-/**
- * Helper for __rw_aligned_storage. Specializations define a member type
- * that is aligned on power of two boundaries.
- */
-template <_RWSTD_SIZE_T _Align>
-struct __rw_aligned_storage_impl;
+#ifndef _RWSTD_NO_ALIGN_TRAITS
 
-#define _RWSTD_ALIGNED_STORAGE_SPEC(N)              \
-  template <> struct __rw_aligned_storage_impl<N> { \
-      typedef _RWSTD_TT_ALIGNED_POD(N) _C_type;     \
-}
-
-_RWSTD_ALIGNED_STORAGE_SPEC(1);
-_RWSTD_ALIGNED_STORAGE_SPEC(2);
-_RWSTD_ALIGNED_STORAGE_SPEC(4);
-_RWSTD_ALIGNED_STORAGE_SPEC(8);
-_RWSTD_ALIGNED_STORAGE_SPEC(16);
-_RWSTD_ALIGNED_STORAGE_SPEC(32);
-_RWSTD_ALIGNED_STORAGE_SPEC(64);
-_RWSTD_ALIGNED_STORAGE_SPEC(128);
-_RWSTD_ALIGNED_STORAGE_SPEC(256);
-_RWSTD_ALIGNED_STORAGE_SPEC(512);
-_RWSTD_ALIGNED_STORAGE_SPEC(1024);
-_RWSTD_ALIGNED_STORAGE_SPEC(2048);
-_RWSTD_ALIGNED_STORAGE_SPEC(4096);
-_RWSTD_ALIGNED_STORAGE_SPEC(8192);
-
-/**
- * Helper for __rw_default_alignment. The member value will evaluate
- * to the nearest power of two that is a valid alignment value that
- * is less than or equal to _Size.
- *
- * @tparam _Size The size of the object to align.
- * @tparam _N    The power of two value being tested.
- * @tparam _Done Termination condition for recursion. Do not use.
- */
+// Helper for __rw_default_alignment. The member value will evaluate
+// to the nearest power of two that is a valid alignment value that
+// is less than or equal to _Size.
 template <_RWSTD_SIZE_T _Size, _RWSTD_SIZE_T _N,
-          bool _Done =    (_RWSTD_TT_MAX_ALIGNMENT <= _N * 2)
-                       || (_Size < _N * 2)>
+          bool =    (_RWSTD_TT_MAX_ALIGNMENT <= _N * 2)
+                 || (_Size < _N * 2)>
 struct __rw_default_alignment_impl
 {
     enum { value = __rw_default_alignment_impl<_Size, _N * 2>::value };
 };
 
-/**
- * Helper for __rw_default_alignment. The member value will evaluate
- * to the nearest power of two that is less than or equal to _Size.
- * This specialization is used to terminate recursion. It is only used
- * when when _Done in the primary template evaluates is true. 
- *
- * @tparam _Size The size of the object to align.
- * @tparam _N    The power of two value being tested.
- */
+// Helper for __rw_default_alignment. The member value will evaluate
+// to the nearest power of two that is less than or equal to _Size.
+// This specialization is used to terminate recursion. It is only used
+// when when _Done in the primary template evaluates is true.
 template <_RWSTD_SIZE_T _Size, _RWSTD_SIZE_T _N>
 struct __rw_default_alignment_impl<_Size, _N, true>
 {
     enum { value = _N };
 };
 
-/**
- * Helper for __rw_aligned_storage. The value member shall be the most
- * most stringent alignment requirement for any C++ object whose size
- * is no greater than _Size. This implementation will set value to be
- * the nearest power of two value that is less than or equal to _Size.
- *
- * @tparam _Size Size of the object to calculate the alignment for.
- */
+
+// Helper for __rw_aligned_storage. The value member shall be the most
+// most stringent alignment requirement for any C++ object whose size
+// is no greater than _Size. This implementation will set value to be
+// the nearest power of two value that is less than or equal to _Size.
 template <_RWSTD_SIZE_T _Size>
 struct __rw_default_alignment
 {
     enum { value = __rw_default_alignment_impl<_Size, 1>::value };
 };
 
+#ifdef __GNUG__
 
-/**
- *
- */
 template <_RWSTD_SIZE_T _Size,
           _RWSTD_SIZE_T _Align = __rw_default_alignment<_Size>::value>
 struct __rw_aligned_storage
 {
-    _RWSTD_STATIC_ASSERT (_Size != 0,
-                          "Unsupported size");
-    
-    _RWSTD_STATIC_ASSERT ((_Align & (_Align - 1)) == 0 || _Align == 0,
-                          "Unsupported alignment"); // expect power of 2
-    
-    _RWSTD_STATIC_ASSERT (_Align <= _RWSTD_TT_MAX_ALIGNMENT,
-                          "Unsupported alignment"); // expect less than max
-
-    typedef union {
-        unsigned char __size [_Size];
-
-        typename
-        __rw_aligned_storage_impl<_Align>::_C_type __align;
+    typedef struct {
+        _RWSTD_TT_ALIGNED_POD (_Align) _C_align;
+        unsigned char _C_size [_Size];
     } type;
 };
 
+#else // !__GNUG__
+
+// Helper for __rw_aligned_storage.
+template <_RWSTD_SIZE_T _Align>
+struct __rw_aligned_storage_impl;
+
+#define _RWSTD_ALIGNED_STORAGE_SPEC(N)              \
+  template <> struct __rw_aligned_storage_impl<N> { \
+      typedef _RWSTD_TT_ALIGNED_POD (N) _C_type;  };
+
+_RWSTD_ALIGNED_STORAGE_SPEC(1)
+_RWSTD_ALIGNED_STORAGE_SPEC(2)
+_RWSTD_ALIGNED_STORAGE_SPEC(4)
+_RWSTD_ALIGNED_STORAGE_SPEC(8)
+_RWSTD_ALIGNED_STORAGE_SPEC(16)
+
+#if (32 <= _RWSTD_TT_MAX_ALIGNMENT)
+  _RWSTD_ALIGNED_STORAGE_SPEC(32)
+#endif
+
+#if (64 <= _RWSTD_TT_MAX_ALIGNMENT)
+  _RWSTD_ALIGNED_STORAGE_SPEC(64)
+#endif
+
+#if (128 <= _RWSTD_TT_MAX_ALIGNMENT)
+  _RWSTD_ALIGNED_STORAGE_SPEC(128)
+#endif
+
+#if (256 <= _RWSTD_TT_MAX_ALIGNMENT)
+  _RWSTD_ALIGNED_STORAGE_SPEC(256)
+#endif
+
+#if (512 <= _RWSTD_TT_MAX_ALIGNMENT)
+  _RWSTD_ALIGNED_STORAGE_SPEC(512)
+#endif
+
+#if (1024 <= _RWSTD_TT_MAX_ALIGNMENT)
+  _RWSTD_ALIGNED_STORAGE_SPEC(1024)
+#endif
+
+#if (2048 <= _RWSTD_TT_MAX_ALIGNMENT)
+  _RWSTD_ALIGNED_STORAGE_SPEC(2048)
+#endif 
+
+#if (4096 <= _RWSTD_TT_MAX_ALIGNMENT)
+  _RWSTD_ALIGNED_STORAGE_SPEC(4096)
+#endif  
+
+#if (8192 <= _RWSTD_TT_MAX_ALIGNMENT)
+  _RWSTD_ALIGNED_STORAGE_SPEC(8192)
+#endif
+
+template <_RWSTD_SIZE_T _Size,
+          _RWSTD_SIZE_T _Align = __rw_default_alignment<_Size>::value>
+struct __rw_aligned_storage
+{
+    typedef union {
+        typename
+        __rw_aligned_storage_impl<_Align>::_C_type _C_align;
+
+        unsigned char _C_size [_Size];
+    } type;
+};
+
+#endif // !__GNUG__
+
 
 #ifndef _RWSTD_NO_VARIADIC_TEMPLATES
 
-/**
- * Helper for __rw_aligned_union. Provides a typedef type that
- * is the largest type in the sequence of provided types.
- */
+// Helper for __rw_aligned_union. Provides a typedef type that
+// is the largest type in the sequence of provided types.
 template <class... _Types>
 struct __rw_biggest;
 
 template <class _TypeT, class... _Types>
 struct __rw_biggest<_TypeT, _Types...>
 {
-    typedef typename
-    __rw_biggest<_Types...>::type _TypeU;
-
-    typedef typename
-    __rw_conditional<sizeof (_TypeT) < sizeof (_TypeU),
-	                 _TypeU, _TypeT>::type type;
+    enum { _C_values = __rw_biggest<_Types...>::_C_value,
+           _C_value  =   sizeof (_TypeT) < _C_values
+                       ? _C_values 
+                       : sizeof (_TypeT) };
 };
 
 template <class _TypeT>
 struct __rw_biggest<_TypeT>
 {
-    typedef _TypeT type;
+    enum { _C_value = sizeof (_TypeT) };
 };
 
-/**
- * Helper for __rw_aligned_union. Provides a typedef type that
- * is the type with the strictest alignment requirement in the
- * sequence of provided types.
- */
+// Helper for __rw_aligned_union.
 template <class... _Types>
 struct __rw_strictest;
 
 template <class _TypeT, class... _Types>
 struct __rw_strictest<_TypeT, _Types...>
 {
-    typedef typename
-    __rw_strictest<_Types...>::type _TypeU;
-
-    typedef typename
-    __rw_conditional<   __rw_alignment_of<_TypeT>::value
-                      < __rw_alignment_of<_TypeU>::value,
-                     _TypeU, _TypeT>::type type;
+    enum { _C_values = __rw_strictest<_Types...>::_C_value,
+           _C_value =   __rw_alignment_of<_TypeT>::value < _C_values
+                      ? _C_values
+                      : __rw_alignment_of<_TypeT>::value };
 };
 
 template <class _TypeT>
 struct __rw_strictest<_TypeT>
 {
-    typedef _TypeT type;
+    enum { _C_value = __rw_alignment_of<_TypeT>::value };
 };
 
 template <_RWSTD_SIZE_T _Len, class... _Types>
@@ -221,125 +217,72 @@
 template <_RWSTD_SIZE_T _Len, class _TypeT, class... _Types>
 struct __rw_aligned_union<_Len, _TypeT, _Types...>
 {
-    typedef typename
-    __rw_biggest<_TypeT, _Types...>::type _C_biggest;
+    enum { _C_len_value   = _Len,
+           _C_size_value  = __rw_biggest<_TypeT, _Types...>::_C_value,
+           _C_align_value = __rw_strictest<_TypeT, _Types...>::_C_value };
 
     typedef typename
-    __rw_strictest<_TypeT, _Types...>::type _C_strictest;
-
-    static const _RWSTD_SIZE_T _C_size_value =
-        sizeof (_C_biggest);
-
-    static const _RWSTD_SIZE_T alignment_value =
-        __rw_alignment_of<_C_strictest>::value;
-
-    typedef typename
-    __rw_aligned_storage<_Len < _C_size_value ? _C_size_value : _Len,
-                         alignment_value>::type type;
+    __rw_aligned_storage<  _C_len_value < _C_size_value
+                         ? _C_size_value : _C_len_value,
+                         _C_align_value>::type type;
 };
 
-#if 0
-#  ifndef _RWSTD_NO_STATIC_CONST_MEMBER_DEFINITION
-
-template <_RWSTD_SIZE_T _Len, class... _Types>
-const _RWSTD_SIZE_T
-__rw_aligned_union<_Len, _Types...>::alignment_value;
-
-template <_RWSTD_SIZE_T _Len, class... _Types>
-const _RWSTD_SIZE_T
-__rw_aligned_union<_Len, _Types...>::_C_size_value;
-
-#  endif // _RWSTD_NO_STATIC_CONST_MEMBER_DEFINITION
-#endif
-
 #else // _RWSTD_NO_VARIADIC_TEMPLATES
 
+// Helper. Gives the largest of a series of values.
+template <unsigned _A    , unsigned _B = 0,
+          unsigned _C = 0, unsigned _D = 0,
+          unsigned _E = 0, unsigned _F = 0,
+          unsigned _G = 0, unsigned _H = 0>
+struct __rw_max_uint
+{
+    enum {
+            _C_ab = _A < _B ? _B : _A,
+            _C_cd = _C < _D ? _D : _C,
+            _C_abcd = _C_ab < _C_cd ? _C_cd : _C_ab,
+
+            _C_ef = _E < _F ? _F : _E,
+            _C_gh = _G < _H ? _H : _G,
+            _C_efgh = _C_ef < _C_gh ? _C_gh : _C_ef,
+
+            _C_value = _C_abcd < _C_efgh ?  _C_efgh : _C_abcd
+    };
+};
+
 struct __rw_empty { };
 
-/**
- * Helper for __rw_aligned_union. Provides a typedef type that
- * is the largest type in the sequence of provided types.
- */
+// Helper for __rw_aligned_union.
 template <class _Type1             , 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_biggest
 {
-    typedef typename
-    __rw_conditional<(sizeof _Type1 < sizeof _Type2),
-                     _Type2, _Type1>::type _Type12;
-
-    typedef typename
-    __rw_conditional<(sizeof _Type3 < sizeof _Type4),
-                     _Type4, _Type3>::type _Type34;
-
-    typedef typename
-    __rw_conditional<(sizeof _Type5 < sizeof _Type6),
-                     _Type6, _Type5>::type _Type56;
-
-    typedef typename
-    __rw_conditional<(sizeof _Type7 < sizeof _Type8),
-                     _Type8, _Type7>::type _Type78;
-
-    typedef typename
-    __rw_conditional<(sizeof _Type12 < sizeof _Type34),
-                     _Type34, _Type12>::type _Type1234;
-
-    typedef typename
-    __rw_conditional<(sizeof _Type56 < sizeof _Type78),
-                     _Type78, _Type56>::type _Type5678;
-
-    typedef typename
-    __rw_conditional<(sizeof _Type1234 < sizeof _Type5678),
-                     _Type5678, _Type1234>::type type;
+    enum { _C_value =
+        __rw_max_uint<sizeof (_Type1), sizeof (_Type2),
+                      sizeof (_Type3), sizeof (_Type4),
+                      sizeof (_Type5), sizeof (_Type6),
+                      sizeof (_Type7), sizeof (_Type8)>::_C_value
+    };
 };
 
-/**
- * Helper for __rw_aligned_union. Provides a typedef type that
- * is the type with the strictest alignment requirement in the
- * sequence of provided types.
- */
+// Helper for __rw_aligned_union.
 template <class _Type1             , 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_strictest
 {
-    typedef typename
-    __rw_conditional<   (__rw_alignment_of<_Type1>::value)
-                      < (__rw_alignment_of<_Type2>::value),
-                     _Type2, _Type1>::type _Type12;
-
-    typedef typename
-    __rw_conditional<   (__rw_alignment_of<_Type3>::value)
-                      < (__rw_alignment_of<_Type4>::value),
-                     _Type4, _Type3>::type _Type34;
-
-    typedef typename
-    __rw_conditional<   (__rw_alignment_of<_Type5>::value)
-                      < (__rw_alignment_of<_Type6>::value),
-                     _Type6, _Type5>::type _Type56;
-
-    typedef typename
-    __rw_conditional<   (__rw_alignment_of<_Type7>::value)
-                      < (__rw_alignment_of<_Type8>::value),
-                     _Type8, _Type7>::type _Type78;
-
-    typedef typename
-    __rw_conditional<   (__rw_alignment_of<_Type12>::value)
-                      < (__rw_alignment_of<_Type34>::value),
-                     _Type34, _Type12>::type _Type1234;
-
-    typedef typename
-    __rw_conditional<   (__rw_alignment_of<_Type56>::value)
-                      < (__rw_alignment_of<_Type78>::value),
-                     _Type78, _Type56>::type _Type5678;
-
-    typedef typename
-    __rw_conditional<   (__rw_alignment_of<_Type1234>::value)
-                      < (__rw_alignment_of<_Type5678>::value),
-                     _Type5678, _Type1234>::type type;
+    enum { _C_value =
+        __rw_max_uint<__rw_alignment_of<_Type1>::value,
+                      __rw_alignment_of<_Type2>::value,
+                      __rw_alignment_of<_Type3>::value,
+                      __rw_alignment_of<_Type4>::value,
+                      __rw_alignment_of<_Type5>::value,
+                      __rw_alignment_of<_Type6>::value,
+                      __rw_alignment_of<_Type7>::value,
+                      __rw_alignment_of<_Type8>::value>::_C_value
+        };
 };
 
 template <_RWSTD_SIZE_T _Len,
@@ -349,69 +292,32 @@
           class _Type7 = __rw_empty, class _Type8 = __rw_empty>
 struct __rw_aligned_union
 {
-    typedef typename
-    __rw_biggest<_Type1, _Type2, _Type3, _Type4,
-                      _Type5, _Type6, _Type7, _Type8>::type _C_biggest;
+    enum { _C_len_value   = _Len,
+           _C_size_value  =
+               __rw_biggest<_Type1, _Type2, _Type3, _Type4,
+                            _Type5, _Type6, _Type7, _Type8>::_C_value,
+           _C_align_value =
+               __rw_strictest<_Type1, _Type2, _Type3, _Type4,
+                              _Type5, _Type6, _Type7, _Type8>::_C_value
+    };
 
     typedef typename
-    __rw_strictest<_Type1, _Type2, _Type3, _Type4,
-                         _Type5, _Type6, _Type7, _Type8>::type _C_strictest;
-
-    static const _RWSTD_SIZE_T _C_size_value =
-        sizeof (_C_biggest);
-
-    static const _RWSTD_SIZE_T alignment_value =
-        __rw_alignment_of<_C_strictest>::value;
-
-    typedef typename
-    __rw_aligned_storage<_C_size_value < _Len ? _Len : _C_size_value,
-                         alignment_value>::type type;
+    __rw_aligned_storage<  _C_size_value < _C_len_value
+                         ? _C_len_value : _C_size_value,
+                         _C_align_value>::type type;
 };
 
-#ifndef _RWSTD_NO_STATIC_CONST_MEMBER_DEFINITION
-
-template <_RWSTD_SIZE_T _Len,
-          class _Type1, class _Type2, class _Type3, class _Type4,
-          class _Type5, class _Type6, class _Type7, class _Type8>
-const _RWSTD_SIZE_T
-__rw_aligned_union<_Len,
-                   _Type1, _Type2, _Type3, _Type4,
-                   _Type5, _Type6, _Type7, _Type8>::alignment_value;
-
-template <_RWSTD_SIZE_T _Len,
-          class _Type1, class _Type2, class _Type3, class _Type4,
-          class _Type5, class _Type6, class _Type7, class _Type8>
-const _RWSTD_SIZE_T
-__rw_aligned_union<_Len,
-                   _Type1, _Type2, _Type3, _Type4,
-                   _Type5, _Type6, _Type7, _Type8>::_C_size_value;
-
-#endif // _RWSTD_NO_STATIC_CONST_MEMBER_DEFINITION
-
 #endif // !_RWSTD_NO_VARIADIC_TEMPLATES
 
+#endif // !_RWSTD_NO_ALIGN_TRAITS
 
 
-/**
- * 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>
 {
@@ -420,26 +326,12 @@
 #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>
 {
@@ -448,17 +340,6 @@
 #define _RWSTD_DISABLE_IF(C,T) _RW::__rw_disable_if<C,T>::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
 {
diff --git a/include/rw/_meta_prop.h b/include/rw/_meta_prop.h
index beb5aa3..8eb4697 100644
--- a/include/rw/_meta_prop.h
+++ b/include/rw/_meta_prop.h
@@ -32,9 +32,9 @@
 
 #include <rw/_defs.h>
 #include <rw/_meta_cat.h>
+#include <rw/_meta_comp.h>
 #include <rw/_meta_arr.h>
 #include <rw/_meta_cv.h>
-#include <rw/_static_assert.h>
 
 _RWSTD_NAMESPACE (__rw) {
 
@@ -44,9 +44,6 @@
   template <> struct Trait<Type volatile> : __rw_true_type { };      \
   template <> struct Trait<Type const volatile> : __rw_true_type { }
 
-/**
- * UnaryTypeTrait indicates that _TypeT is const-qualified.
- */
 template <class _TypeT>
 struct __rw_is_const : __rw_false_type
 {
@@ -57,9 +54,6 @@
 {
 };
 
-/**
- * UnaryTypeTrait indicates that _TypeT is volatile-qualified.
- */
 template <class _TypeT>
 struct __rw_is_volatile : __rw_false_type
 {
@@ -70,294 +64,479 @@
 {
 };
 
+#if    defined (__SUNPRO_CC) && (__SUNPRO_CC <= 0x590) \
+    || defined (_MSC_VER) && (_MSC_VER <= 1400)
+
+// additional specializations needed for these compilers
 
 template <class _TypeT>
-struct __rw_is_standard_layout_impl
+struct __rw_is_const<const _TypeT []> : __rw_true_type
 {
-    typedef typename __rw_remove_all_extents<_TypeT>::type _TypeU;
-    enum { _C_value = __rw_is_scalar<_TypeU>::value };
 };
 
+template <class _TypeT, _RWSTD_SIZE_T _Size>
+struct __rw_is_const<const _TypeT [_Size]> : __rw_true_type
+{
+};
+
+template <class _TypeT>
+struct __rw_is_volatile<volatile _TypeT []> : __rw_true_type
+{
+};
+
+template <class _TypeT, _RWSTD_SIZE_T _Size>
+struct __rw_is_volatile<volatile _TypeT [_Size]> : __rw_true_type
+{
+};
+
+#endif
+
+#define _RWSTD_IS_CONST(T) _RW::__rw_is_const<T>::value
+#define _RWSTD_IS_VOLATILE(T) _RW::__rw_is_volatile<T>::value
+
+
+#if !defined(_RWSTD_TT_IS_POD)
+
 template <class _TypeT>
 struct __rw_is_pod_impl
 {
     typedef typename __rw_remove_all_extents<_TypeT>::type _TypeU;
+    typedef typename __rw_remove_cv<_TypeU>::type _NoCV_TypeU;
 
-    enum { _C_value =    __rw_is_scalar<_TypeU>::value
-#ifdef _RWSTD_TT_IS_POD
-                      || _RWSTD_TT_IS_POD(_TypeU)
-#endif
-    };
+    enum { _C_value = __rw_is_scalar<_NoCV_TypeU>::value };
 };
 
+#  define _RWSTD_IS_POD(T) _RW::__rw_is_pod_impl<T>::_C_value
+
+#elif defined (__EDG_VERSION__) || defined (_MSC_VER)
+
 template <class _TypeT>
-struct __rw_is_empty_impl
+struct __rw_is_pod_impl
 {
-    enum { _C_value =    __rw_is_class<_TypeT>::value
-#ifdef _RWSTD_TT_IS_EMPTY
-                      && _RWSTD_TT_IS_EMPTY(_TypeT)
-#endif
-    };
+    typedef typename __rw_remove_all_extents<_TypeT>::type _TypeU;
+    typedef typename __rw_remove_cv<_TypeU>::type _NoCV_TypeU;
+
+    // __is_pod works for pod class types only, add scalars
+    enum { _C_value =    __rw_is_scalar<_NoCV_TypeU>::value
+                      || _RWSTD_TT_IS_POD(_NoCV_TypeU) };
 };
 
-#undef _RWSTD_TT_IS_STDANDARD_LAYOUT
-#define _RWSTD_TT_IS_STDANDARD_LAYOUT(T) __rw_is_standard_layout_impl<T>::_C_value
+#  define _RWSTD_IS_POD(T) _RW::__rw_is_pod_impl<T>::_C_value
 
-#ifdef _MSC_VER
+#else
+#  define _RWSTD_IS_POD(T) _RWSTD_TT_IS_POD(T)
+#endif // _RWSTD_TT_IS_POD
 
-#  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)>
+    : __rw_integral_constant<bool, _RWSTD_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).
- */
+
+#if !defined (_RWSTD_TT_IS_STANDARD_LAYOUT)
+#  define _RWSTD_IS_STANDARD_LAYOUT(T) _RWSTD_IS_POD(T)
+#else
+#  define _RWSTD_IS_STANDARD_LAYOUT(T) _RWSTD_TT_IS_STANDARD_LAYOUT(T)
+#endif // _RWSTD_TT_IS_STANDARD_LAYOUT
+
+template <class _TypeT>
+struct __rw_is_standard_layout
+    : __rw_integral_constant<bool, _RWSTD_IS_STANDARD_LAYOUT(_TypeT)>
+{
+};
+
+
+
+#if defined (_RWSTD_TT_IS_EMPTY)
+
+#  if defined (__EDG_VERSION__) || defined (_MSC_VER)
+#    define _RWSTD_IS_EMPTY(T) \
+        (_RWSTD_TT_IS_EMPTY(T) && !_RW::__rw_is_union<T>::value)
+#  else
+#    define _RWSTD_IS_EMPTY(T) _RWSTD_TT_IS_EMPTY(T)
+#  endif
+
+#elif defined (_RWSTD_TT_IS_CLASS) || defined (_RWSTD_TT_IS_UNION)
+
+//
+// The primary template is for the case that _TypeT is a class type.
+// It checks that the size of a derived class is larger than the size
+// of a non-derived class. If the sizes are the same, then _TypeT is
+// assumed to be an empty class.
+//
+template <class _TypeT, bool = __rw_is_class<_TypeT>::value>
+struct __rw_is_empty_impl
+{
+    struct _C_empty_1 : _TypeT { long _C_pad [32]; };
+    struct _C_empty_2          { long _C_pad [32]; };
+
+    enum { _C_value = sizeof (_C_empty_1) == sizeof (_C_empty_2) }; 
+};
+
+//
+// This specialization is for the case that _TypeT is a union or other
+// non-class type.
+//
+template <class _TypeT>
+struct __rw_is_empty_impl<_TypeT, false>
+{
+    enum { _C_value = 0 };
+};
+
+#  define _RWSTD_IS_EMPTY(T) _RW::__rw_is_empty_impl<T>::_C_value
+
+#else
+   // we have no reliable way to tell if the type is empty,
+   // so we assume that it is not.
+#  define _RWSTD_IS_EMPTY(T) 0
+#endif // !_RWSTD_TT_IS_EMPTY
+
 template <class _TypeT>
 struct __rw_is_empty
-    : __rw_integral_constant<bool, _RWSTD_TT_IS_EMPTY(_TypeT)>
+    : __rw_integral_constant<bool, _RWSTD_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).
- */
+
+#if defined (_RWSTD_TT_IS_POLYMORPHIC)
+#  define _RWSTD_IS_POLYMORPHIC(T) _RWSTD_TT_IS_POLYMORPHIC(T)
+#elif defined (_RWSTD_TT_IS_CLASS) || defined (_RWSTD_TT_IS_UNION)
+
+//
+// The primary template is for the case that _TypeT is class type.
+// It checks the size of a derived class against the size of a
+// derived class that provides a virtual method. If the size of
+// the objects are the same then we assume that _TypeT already
+// has a vtbl pointer.
+//
+template <class _TypeT, bool = __rw_is_class<_TypeT>::value>
+struct __rw_is_polymorphic_impl
+{
+    template <class _TypeU>
+    struct _C_type_1 : _TypeU
+    {
+        // only polymorphic if _TypeT is
+    };
+
+    template <class _TypeU>
+    struct _C_type_2 : _TypeU
+    {
+        virtual void _C_method ();
+    };
+
+    enum { _C_value =    sizeof (_C_type_1<_TypeT>)
+                      == sizeof (_C_type_2<_TypeT>) };
+};
+
+//
+// This specialization is for the case that _TypeT is not a class type.
+//
+template <class _TypeT>
+struct __rw_is_polymorphic_impl<_TypeT, false>
+{
+    enum { _C_value = 0 };
+};
+
+#  define _RWSTD_IS_POLYMORPHIC(T) \
+       _RW::__rw_is_polymorphic_impl<T>::_C_value
+
+#else
+#  define _RWSTD_IS_POLYMORPHIC(T) _RW::__rw_is_class_or_union<T>::value
+#endif // _RWSTD_TT_IS_POLYMORPHIC
+
 template <class _TypeT>
 struct __rw_is_polymorphic
-    : __rw_integral_constant<bool, _RWSTD_TT_IS_POLYMORPHIC(_TypeT)>
+    : __rw_integral_constant<bool, _RWSTD_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).
- */
+
+
+#if defined (_RWSTD_TT_IS_ABSTRACT)
+#  define _RWSTD_IS_ABSTRACT(T) _RWSTD_TT_IS_ABSTRACT(T)
+#elif defined (_RWSTD_TT_IS_CLASS) || defined (_RWSTD_TT_IS_UNION)
+
+//
+// The primary template is for the case that _TypeT is class type.
+// It checks that _TypeT is an abstract type by exploiting the
+// resolution to CWG#337 [http://tinyurl.com/6yltlk]
+//
+template <class _TypeT, bool = __rw_is_class<_TypeT>::value>
+struct __rw_is_abstract_impl
+{
+    struct _C_no  { };
+    struct _C_yes { _C_no __pad[2]; };
+    
+    template <class U>
+    static _C_yes _C_is (int, ...);
+
+    template <class U>
+    static _C_no  _C_is (int, U(*)[1]);
+
+    enum { _C_value =    sizeof (_C_yes)
+                      == sizeof (_C_is<_TypeT>(0, 0)) };
+};
+
+//
+// This specialization is for the case that _TypeT is not a class type.
+//
+template <class T>
+struct __rw_is_abstract_impl<T,true>
+{
+    enum { _C_value = 0 };
+};
+
+#  define _RWSTD_IS_ABSTRACT(T) _RW::__rw_is_abstract_impl<T>::_C_value
+
+#else
+#  define _RWSTD_IS_ABSTRACT(T) _RW::__rw_is_class_or_union<T>::value
+#endif // !_RWSTD_TT_IS_ABSTRACT
+
 template <class _TypeT>
 struct __rw_is_abstract
-    : __rw_integral_constant<bool, _RWSTD_TT_IS_ABSTRACT(_TypeT)>
+    : __rw_integral_constant<bool, _RWSTD_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).
- */
+
+
+#if !defined (_RWSTD_TT_HAS_TRIVIAL_CTOR)
+#  define _RWSTD_HAS_TRIVIAL_CTOR(T) _RW::__rw_is_pod<T>::value
+#elif defined (__EDG_VERSION__) || defined (_MSC_VER)
+
+template <class _TypeT>
+struct __rw_has_trivial_ctor_impl
+{
+    typedef typename __rw_remove_all_extents<_TypeT>::type _TypeU;
+
+    enum { _C_value =    __rw_is_scalar<_TypeU>::value
+                      || _RWSTD_TT_HAS_TRIVIAL_CTOR (_TypeU) };
+};
+
+#  define _RWSTD_HAS_TRIVIAL_CTOR(T) \
+     _RW::__rw_has_trivial_ctor_impl<T>::_C_value
+
+#else
+#  define _RWSTD_HAS_TRIVIAL_CTOR(T) _RWSTD_TT_HAS_TRIVIAL_CTOR(T)
+#endif // _RWSTD_TT_HAS_TRIVIAL_CTOR
+
 template <class _TypeT>
 struct __rw_has_trivial_ctor
-    : __rw_integral_constant<bool, _RWSTD_TT_HAS_TRIVIAL_CTOR(_TypeT)>
+    : __rw_integral_constant<bool, _RWSTD_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).
- */
+
+
+#if !defined (_RWSTD_TT_HAS_TRIVIAL_COPY)
+#  define _RWSTD_HAS_TRIVIAL_COPY(T)         \
+    (  !_RW::__rw_is_array<T>::value         \
+     && (   _RW::__rw_is_reference<T>::value \
+         || _RW::__rw_is_pod<T>::value))
+#elif defined (__EDG_VERSION__) || defined (_MSC_VER)
+#  define _RWSTD_HAS_TRIVIAL_COPY(T)      \
+     (   _RW::__rw_is_reference<T>::value \
+      || _RW::__rw_is_scalar<T>::value    \
+      || _RWSTD_TT_HAS_TRIVIAL_COPY(T))
+#elif defined (__GNUG__)
+#  define _RWSTD_HAS_TRIVIAL_COPY(T) \
+    (!_RW::__rw_is_array<T>::value && _RWSTD_TT_HAS_TRIVIAL_COPY(T)) 
+#else
+#  define _RWSTD_HAS_TRIVIAL_COPY(T) _RWSTD_TT_HAS_TRIVIAL_COPY(T)
+#endif // !_RWSTD_TT_HAS_TRIVIAL_COPY
+
 template <class _TypeT>
 struct __rw_has_trivial_copy
-    : __rw_integral_constant<bool, _RWSTD_TT_HAS_TRIVIAL_COPY(_TypeT)>
+    : __rw_integral_constant<bool, _RWSTD_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).
- */
+
+#if !defined (_RWSTD_TT_HAS_TRIVIAL_ASSIGN)
+#  define _RWSTD_HAS_TRIVIAL_ASSIGN(T)    \
+    (    _RW::__rw_is_pod<T>::value       \
+     && !_RW::__rw_is_const<T>::value     \
+     && !_RW::__rw_is_reference<T>::value \
+     && !_RW::__rw_is_array<T>::value)
+#elif defined (__EDG_VERSION__)
+#  define _RWSTD_HAS_TRIVIAL_ASSIGN(T) \
+        (!_RW::__rw_is_array<T>::value \
+      && !_RW::__rw_is_const<T>::value \
+      && !_RW::__rw_is_reference<T>::value \
+      && (_RW::__rw_is_scalar<T>::value || _RWSTD_TT_HAS_TRIVIAL_ASSIGN(T)))
+#elif defined (__GNUG__)
+#  define _RWSTD_HAS_TRIVIAL_ASSIGN(T) \
+    (!_RW::__rw_is_array<T>::value && _RWSTD_TT_HAS_TRIVIAL_ASSIGN(T))
+#elif defined (_MSC_VER)
+#  define _RWSTD_HAS_TRIVIAL_ASSIGN(T) \
+        (!_RW::__rw_is_const<T>::value \
+      && (_RW::__rw_is_scalar<T>::value || _RWSTD_TT_HAS_TRIVIAL_ASSIGN(T)))
+#else
+#  define _RWSTD_HAS_TRIVIAL_ASSIGN(T) _RWSTD_TT_HAS_TRIVIAL_ASSIGN(T)
+#endif // _RWSTD_TT_HAS_TRIVIAL_ASSIGN
+
 template <class _TypeT>
 struct __rw_has_trivial_assign
-    : __rw_integral_constant<bool, _RWSTD_TT_HAS_TRIVIAL_ASSIGN(_TypeT)>
+    : __rw_integral_constant<bool, _RWSTD_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).
- */
+
+
+#if !defined (_RWSTD_TT_HAS_TRIVIAL_DTOR)
+#  define _RWSTD_HAS_TRIVIAL_DTOR(T) \
+    (_RW::__rw_is_pod<T>::value || _RW::__rw_is_reference<T>::value)
+#elif defined (__GNUC__)
+#  define _RWSTD_HAS_TRIVIAL_DTOR(T)         \
+    (  _RW::__rw_is_reference<_TypeT>::value \
+     || _RWSTD_TT_HAS_TRIVIAL_DTOR (_TypeT))
+#elif defined (__EDG_VERSION__) || defined (_MSC_VER)
+
+template <class _TypeT>
+struct __rw_has_trivial_dtor_impl
+{
+    typedef typename __rw_remove_all_extents<_TypeT>::type _TypeU;
+
+    enum { _C_value =    __rw_is_scalar<_TypeU>::value
+                      || __rw_is_reference<_TypeU>::value
+                      || _RWSTD_TT_HAS_TRIVIAL_DTOR (_TypeU) };
+};
+
+#  define _RWSTD_HAS_TRIVIAL_DTOR(T) \
+    _RW::__rw_has_trivial_dtor_impl<T>::_C_value
+
+#else
+#  define _RWSTD_HAS_TRIVIAL_DTOR(T) _RWSTD_TT_HAS_TRIVIAL_DTOR(T)
+#endif // !_RWSTD_TT_HAS_TRIVIAL_DTOR
+
 template <class _TypeT>
 struct __rw_has_trivial_dtor
-    : __rw_integral_constant<bool, _RWSTD_TT_HAS_TRIVIAL_DTOR(_TypeT)>
+    : __rw_integral_constant<bool, _RWSTD_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_cv<_TypeT>::type _TypeU;
-    typedef typename __rw_remove_all_extents<_TypeU>::type _TypeV;
+    typedef typename __rw_remove_all_extents<_TypeT>::type _TypeU;
+    typedef typename __rw_remove_cv<_TypeU>::type _NoCV_TypeU;
 
-    enum { _C_value =    __rw_is_scalar<_TypeV>::value
-                      || __rw_has_trivial_ctor<_TypeV>::value
-                      && __rw_has_trivial_copy<_TypeV>::value
-                      && __rw_has_trivial_dtor<_TypeV>::value
-                      && __rw_has_trivial_assign<_TypeV>::value
-                      && (__rw_is_class<_TypeV>::value || __rw_is_union<_TypeV>::value) };
+    enum { _C_value =    __rw_is_scalar<_NoCV_TypeU>::value
+                      || __rw_has_trivial_ctor<_NoCV_TypeU>::value
+                      && __rw_has_trivial_copy<_NoCV_TypeU>::value
+                      && __rw_has_trivial_dtor<_NoCV_TypeU>::value
+                      && __rw_has_trivial_assign<_NoCV_TypeU>::value
+                      && (   __rw_is_class<_NoCV_TypeU>::value
+                          || __rw_is_union<_NoCV_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).
- */
+#define _RWSTD_IS_TRIVIAL(T) _RW::__rw_is_trivial<T>::value
+
+
+
+#if !defined (_RWSTD_TT_HAS_NOTHROW_CTOR)
+#  define _RWSTD_HAS_NOTHROW_CTOR(T) _RW::__rw_has_trivial_ctor<T>::value
+#elif defined (__EDG_VERSION__) || defined (_MSC_VER)
+
+template <class _TypeT>
+struct __rw_has_nothrow_ctor_impl
+{
+    typedef typename __rw_remove_all_extents<_TypeT>::type _TypeU;
+
+    enum { _C_value =    __rw_has_trivial_ctor<_TypeT>::value
+                      || _RWSTD_TT_HAS_NOTHROW_CTOR (_TypeU) };
+};
+
+#  define _RWSTD_HAS_NOTHROW_CTOR(T) \
+     _RW::__rw_has_nothrow_ctor_impl<T>::_C_value
+
+#else
+#  define _RWSTD_HAS_NOTHROW_CTOR(T) _RWSTD_TT_HAS_NOTHROW_CTOR(T)
+#endif // _RWSTD_TT_HAS_NOTHROW_CTOR
+
 template <class _TypeT>
 struct __rw_has_nothrow_ctor
-    : __rw_integral_constant<bool, _RWSTD_TT_HAS_NOTHROW_CTOR(_TypeT)>
+    : __rw_integral_constant<bool, _RWSTD_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).
- */
+
+#if !defined (_RWSTD_TT_HAS_NOTHROW_COPY)
+#  define _RWSTD_HAS_NOTHROW_COPY(T) _RW::__rw_has_trivial_copy<T>::value
+#elif defined (__EDG_VERSION__) || defined (_MSC_VER)
+#  define _RWSTD_HAS_NOTHROW_COPY(T) \
+    (_RW::__rw_has_trivial_copy<T>::value || _RWSTD_TT_HAS_NOTHROW_COPY(T))
+#elif defined (__GNUG__)
+#  define _RWSTD_HAS_NOTHROW_COPY(T) \
+    (!_RW::__rw_is_array<T>::value && _RWSTD_TT_HAS_NOTHROW_COPY(T))
+#else
+#  define _RWSTD_HAS_NOTHROW_COPY(T) _RWSTD_TT_HAS_NOTHROW_COPY(T)
+#endif // !_RWSTD_TT_HAS_NOTHROW_COPY
+
 template <class _TypeT>
 struct __rw_has_nothrow_copy
-    : __rw_integral_constant<bool, _RWSTD_TT_HAS_NOTHROW_COPY(_TypeT)>
+    : __rw_integral_constant<bool, _RWSTD_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).
- */
+
+
+#if !defined (_RWSTD_TT_HAS_NOTHROW_ASSIGN)
+#  define _RWSTD_HAS_NOTHROW_ASSIGN(T) \
+    _RW::__rw_has_trivial_assign<T>::value
+#elif defined (__EDG_VERSION__)
+#  define _RWSTD_HAS_NOTHROW_ASSIGN(T) \
+      (!_RW::__rw_is_const<T>::value \
+    && !_RW::__rw_is_reference<T>::value \
+    && (   _RW::__rw_has_trivial_assign<T>::value \
+        || _RWSTD_TT_HAS_NOTHROW_ASSIGN(T)))
+#elif defined (__GNUG__)
+#  define _RWSTD_HAS_NOTHROW_ASSIGN(T) \
+      (  !_RW::__rw_is_array<T>::value \
+       && _RWSTD_TT_HAS_NOTHROW_ASSIGN(T))
+#elif defined (_MSC_VER)
+#  define _RWSTD_HAS_NOTHROW_ASSIGN(T) \
+      (!_RW::__rw_is_const<T>::value \
+    && (   _RW::__rw_has_trivial_assign<T>::value \
+        || _RWSTD_TT_HAS_NOTHROW_ASSIGN(T)))
+#else
+#  define _RWSTD_HAS_NOTHROW_ASSIGN(T) _RWSTD_TT_HAS_NOTHROW_ASSIGN(T)
+#endif // !_RWSTD_TT_HAS_NOTHROW_ASSIGN
+
 template <class _TypeT>
 struct __rw_has_nothrow_assign
-    : __rw_integral_constant<bool, _RWSTD_TT_HAS_NOTHROW_ASSIGN(_TypeT)>
+    : __rw_integral_constant<bool, _RWSTD_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).
- */
+
+#if !defined (_RWSTD_TT_HAS_VIRTUAL_DTOR)
+#  define _RWSTD_HAS_VIRTUAL_DTOR(T) _RW::__rw_is_polymorphic<T>::value
+#else
+#  define _RWSTD_HAS_VIRTUAL_DTOR(T) _RWSTD_TT_HAS_VIRTUAL_DTOR(T)
+#endif // _RWSTD_TT_HAS_VIRTUAL_DTOR
+
 template <class _TypeT>
 struct __rw_has_virtual_dtor
-    : __rw_integral_constant<bool, _RWSTD_TT_HAS_VIRTUAL_DTOR(_TypeT)>
+    : __rw_integral_constant<bool, _RWSTD_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_false_type
 {
 };
 
-/**
- * UnaryTypeTrait that indicates that _TypeT is a signed type.
- */
 template <class _TypeT>
 struct __rw_is_signed : __rw_false_type
 {
@@ -394,62 +573,106 @@
 _RWSTD_TRAIT_SPEC_0_CV(__rw_is_unsigned, unsigned long long);
 #endif   // _RWSTD_NO_LONG_LONG
 
-_RWSTD_TRAIT_SPEC_0_CV(__rw_is_signed,     float);
-_RWSTD_TRAIT_SPEC_0_CV(__rw_is_signed,     double);
+#if 0
+_RWSTD_TRAIT_SPEC_0_CV(__rw_is_unsigned, char16_t);
+_RWSTD_TRAIT_SPEC_0_CV(__rw_is_unsigned, char32_t);
+#endif
+
+_RWSTD_TRAIT_SPEC_0_CV(__rw_is_signed, float);
+_RWSTD_TRAIT_SPEC_0_CV(__rw_is_signed, double);
 
 #ifndef _RWSTD_NO_LONG_DOUBLE
-_RWSTD_TRAIT_SPEC_0_CV(__rw_is_signed,     long double);
+_RWSTD_TRAIT_SPEC_0_CV(__rw_is_signed, long double);
 #endif   // _RWSTD_NO_LONG_DOUBLE
 
-/**
- * UnaryTypeTrait that gets the alignment of _TypeT.
- */
+#define _RWSTD_IS_SIGNED(T)   _RW::__rw_is_signed<T>::value
+#define _RWSTD_IS_UNSIGNED(T) _RW::__rw_is_unsigned<T>::value
+
+
+
+#ifndef _RWSTD_NO_ALIGN_TRAITS
+
+#  if defined (_RWSTD_TT_ALIGN_OF)
+#    define _RWSTD_ALIGN_OF(T) _RWSTD_TT_ALIGN_OF(T)
+#  else
+
 template <class _TypeT>
-struct __rw_alignment_of
-    : __rw_integral_constant<_RWSTD_SIZE_T, _RWSTD_TT_ALIGN_OF(_TypeT)>
+struct __rw_alignment_of_impl
 {
-    //_RWSTD_COMPILE_ASSERT (   _RWSTD_IS_COMPLETE (_TypeT)
-    //                       || _RWSTD_IS_ARRAY (_TypeT)
-    //                       || _RWSTD_IS_VOID (_TypeT));
+    template <class _TypeU>
+    struct _C_nest
+    {
+        unsigned char _C_char;
+        _TypeU _C_type;
+    };
+
+    enum { _C_value =
+       sizeof (_C_nest<_TypeT>) - sizeof (_TypeT) < sizeof (_TypeT)
+     ? sizeof (_C_nest<_TypeT>) - sizeof (_TypeT) < sizeof (_TypeT)
+     : sizeof (_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 <>
+struct __rw_alignment_of_impl<void>
+{
+    enum { _C_value = 0 };
+};
+
+template <>
+struct __rw_alignment_of_impl<const void>
+{
+    enum { _C_value = 0 };
+};
+
+template <>
+struct __rw_alignment_of_impl<volatile void>
+{
+    enum { _C_value = 0 };
+};
+
+template <>
+struct __rw_alignment_of_impl<const volatile void>
+{
+    enum { _C_value = 0 };
+};
+
+#    define _RWSTD_ALIGN_OF(T) _RW::__rw_alignment_of_impl<T>::_C_value
+#  endif // !_RWSTD_TT_ALIGN_OF
+
+template <class _TypeT>
+struct __rw_alignment_of
+    : __rw_integral_constant<_RWSTD_SIZE_T, _RWSTD_ALIGN_OF(_TypeT)>
+{
+};
+
+#endif // !_RWSTD_NO_ALIGN_TRAITS
+
 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, _RWSTD_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.
- */
+#if !defined (__IBMCPP__) || (900 < __IBMCPP__)
+
 template <class _TypeT>
 struct __rw_rank<_TypeT []>
     : __rw_integral_constant<_RWSTD_SIZE_T, 1 + __rw_rank<_TypeT>::value>
 {
 };
 
+#endif
 
-/**
- * UnaryTypeTrait gives the size of the _Depth dimension of _TypeT.
- */
+#define _RWSTD_RANK(T) _RW::__rw_rank<T>::value
+
+
+
 template <class _TypeT, _RWSTD_SIZE_T _Depth>
 struct __rw_extent
     : __rw_integral_constant<_RWSTD_SIZE_T, 0>
@@ -458,28 +681,40 @@
 
 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>
+    : __rw_integral_constant<_RWSTD_SIZE_T,
+                             __rw_extent<_TypeT, _Depth - 1>::value>
 {
 };
 
+#if !defined (__IBMCPP__) || (900 < __IBMCPP__)
+
 template <class _TypeT, _RWSTD_SIZE_T _Depth>
 struct __rw_extent<_TypeT [], _Depth>
-    : __rw_integral_constant<_RWSTD_SIZE_T, __rw_extent<_TypeT, _Depth - 1>::value>
+    : __rw_integral_constant<_RWSTD_SIZE_T,
+                             __rw_extent<_TypeT, _Depth - 1>::value>
 {
 };
 
+#endif
+
 template <class _TypeT, _RWSTD_SIZE_T _Size>
 struct __rw_extent<_TypeT [_Size], 0>
     : __rw_integral_constant<_RWSTD_SIZE_T, _Size>
 {
 };
 
+#if !defined (__IBMCPP__) || (900 < __IBMCPP__)
+
 template <class _TypeT>
 struct __rw_extent<_TypeT [], 0>
     : __rw_integral_constant<_RWSTD_SIZE_T, 0>
 {
 };
 
+#endif
+
+#define _RWSTD_EXTENT(T,D) _RW::__rw_extent<T,D>::value
+
 } // namespace __rw
 
 
diff --git a/include/rw/_meta_ptr.h b/include/rw/_meta_ptr.h
index 6f4082a..fa6b6d1 100644
--- a/include/rw/_meta_ptr.h
+++ b/include/rw/_meta_ptr.h
@@ -35,32 +35,20 @@
 
 _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
+#define _RWSTD_REMOVE_POINTER(T) _RW::__rw_remove_pointer<T>::type
 
-/**
- * TransformationTrait adds a single level of pointer indirection to
- * _TypeT.
- */
 template <class _TypeT>
 struct __rw_add_pointer
 {
@@ -68,7 +56,7 @@
     __rw_remove_reference<_TypeT>::type* type;
 };
 
-//#define _RWSTD_ADD_POINTER(T) typename _RW::__rw_add_pointer<T>::type
+#define _RWSTD_ADD_POINTER(T) _RW::__rw_add_pointer<T>::type
 
 } // namespace __rw
 
diff --git a/include/rw/_meta_ref.h b/include/rw/_meta_ref.h
index 6536cca..448ded4 100644
--- a/include/rw/_meta_ref.h
+++ b/include/rw/_meta_ref.h
@@ -36,24 +36,12 @@
 
 _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&>
 {
@@ -62,12 +50,6 @@
 
 #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&&>
 {
@@ -76,6 +58,9 @@
 
 #endif   // _RWSTD_NO_RVALUE_REFERENCES
 
+#define _RWSTD_REMOVE_REFERENCE(T) _RW::__rw_remove_reference<T>::type
+
+
 template <class _TypeT, bool =    !__rw_is_void<_TypeT>::value
                                && !__rw_is_reference<_TypeT>::value,
                         bool = __rw_is_rvalue_reference<_TypeT>::value>
@@ -98,19 +83,19 @@
 {
     // for rval reference types, _C_type shall become the corresponding
     // lvalue reference type
-    typedef _TYPENAME __rw_remove_reference<_TypeT>::type& _C_type;
+    typedef typename __rw_remove_reference<_TypeT>::type& _C_type;
 };
 
-/**
- * TransformationTrait adds a lvalue reference to the input type _TypeT.
- */
 template <class _TypeT>
 struct __rw_add_lvalue_reference
 {
-    typedef _TYPENAME
+    typedef typename
     __rw_add_lvalue_reference_impl<_TypeT>::_C_type type;
 };
 
+#define _RWSTD_ADD_LVALUE_REFERENCE(T) \
+    _RW::__rw_add_lvalue_reference<T>::type
+
 
 template <class _TypeT, bool =    __rw_is_object<_TypeT>::value
                                || __rw_is_function<_TypeT>::_C_type>
@@ -137,10 +122,12 @@
 template <class _TypeT>
 struct __rw_add_rvalue_reference
 {
-    typedef _TYPENAME
+    typedef typename
     __rw_add_rvalue_reference_impl<_TypeT>::_C_type type;
 };
 
+#define _RWSTD_ADD_RVALUE_REFERENCE(T) \
+    _RW::__rw_add_rvalue_reference<T>::type
 
 } // namespace __rw
 
diff --git a/include/rw/_meta_rel.h b/include/rw/_meta_rel.h
index f952085..d9d3ad6 100644
--- a/include/rw/_meta_rel.h
+++ b/include/rw/_meta_rel.h
@@ -32,87 +32,140 @@
 
 #include <rw/_defs.h>
 
-#include <rw/_meta_arr.h>
-#include <rw/_meta_ptr.h>
-#include <rw/_meta_ref.h>
-#include <rw/_meta_cat.h>
-#include <rw/_meta_cv.h>
+#ifndef _RWSTD_TT_IS_CONVERTIBLE
+#  include <rw/_meta_arr.h>
+#  include <rw/_meta_ptr.h>
+#  include <rw/_meta_ref.h>
+#  include <rw/_meta_cat.h>
+#  include <rw/_meta_cv.h>
+#endif // _RWSTD_TT_IS_CONVERTIBLE
+
+#ifndef _RWSTD_TT_IS_BASE_OF
+#  include <rw/_meta_cv.h>
+#  include <rw/_meta_ptr.h>
+#endif //_RWSTD_TT_IS_BASE_OF
 
 _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
+#define _RWSTD_IS_SAME(T,U) _RW::__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)>
+
+#ifndef _RWSTD_TT_IS_BASE_OF
+
+//
+// Primary template  handles case that either of _Base or _Derived
+// is not a class type.
+//
+template <class _Base, class _Derived,
+          bool =   __rw_is_class<_Base>::value
+                && __rw_is_class<_Derived>::value>
+struct __rw_is_base_of_impl
 {
-    //_RWSTD_ASSERT (    _RWSTD_IS_CLASS (_TypeT)
-    //               &&  _RWSTD_IS_CLASS (_TypeU)
-    //               && !_RWSTD_IS_SAME(_TypeT, _TypeU)
+    enum { _C_value = 0 };
+};
+
+//
+// This specialization is for the case that _Base and
+// _Derived are class types, but not the same type.
+//
+// This little gem was taken from a comp.lang.c++.moderated post
+// by Rani Sharoni [see http://tinyurl.com/6pdv3k]
+//
+template <class _Base, class _Derived>
+struct __rw_is_base_of_impl<_Base, _Derived, true>
+{
+    struct _C_no  { };
+    struct _C_yes { _C_no __pad [2]; };
+
+    struct _C_nest
+    {
+        operator const volatile _Base&    () const;
+        operator const volatile _Derived& ();
+
+        // the template is used so that the compiler will prefer the
+        // non-template _C_is, in case that the conversion would be
+        // ambiguous (as it is in the case where the types are unrelated).
+        template <class _TypeT>
+        static _C_yes _C_is (const volatile _Derived&, _TypeT);
+        static _C_no _C_is  (const volatile _Base&   , int);
+    };
+
+    enum { _C_value = 
+           _RW::__rw_is_same<const volatile _Base,
+                             const volatile _Derived&>::value
+        || sizeof (_C_yes) == sizeof (_C_nest::_C_is (_C_nest (), 0))
+    };
+};
+
+//
+// This specialization is for the case that _Base and
+// _Derived are the same class type.
+//
+template <class _TypeT>
+struct __rw_is_base_of_impl<_TypeT, _TypeT, true>
+{
+    enum { _C_value = 1 };
+};
+
+#  define _RWSTD_IS_BASE_OF(T,U) \
+     _RW::__rw_is_base_of_impl<T,U>::_C_value
+
+#elif defined (_MSC_VER)
+#  define _RWSTD_IS_BASE_OF(T,U)     \
+    (   _RW::__rw_is_class<T>::value \
+     && _RW::__rw_is_class<U>::value \
+     && _RWSTD_TT_IS_BASE_OF(T,U))
+#else
+#  define _RWSTD_IS_BASE_OF(T,U) _RWSTD_TT_IS_BASE_OF(T,U)
+#endif // _RWSTD_TT_IS_BASE_OF
+
+template <class _Base, class _Derived>
+struct __rw_is_base_of
+    : __rw_integral_constant<bool, _RWSTD_IS_BASE_OF(_Base,_Derived)>
+{
+    //_RWSTD_ASSERT (    _RWSTD_IS_CLASS (_Base)
+    //               &&  _RWSTD_IS_CLASS (_Derived)
+    //               && !_RWSTD_IS_SAME(_Base, _Derived)
     //               ||
 };
 
-#define _RWSTD_IS_BASE_OF(T,U)                                        \
-    __rw_is_base_of<T,U>::value
 
+#if !defined (_RWSTD_TT_IS_CONVERTIBLE)
 
-/**
- * Primitive type trait tells us if we can create a _TypeU from a _TypeT.
- */
-template <class _TypeT, class _TypeU>
+template <class _From, class _To>
 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, ...);
+    struct _Dummy
+    {
+        template <class _Anything>
+        _Dummy (_Anything);
+    };
 
-    static _TypeT _C_make ();
+    template <class _TypeT>
+    static _C_no _C_is (_Dummy, _TypeT);
+    static _C_yes _C_is (_To, int);
 
-    enum { _C_value = sizeof (_C_yes) == sizeof (_C_is (0, _C_make ())) };
+    static _From _C_make ();
+
+    enum { _C_value = sizeof (_C_yes) == sizeof (_C_is (_C_make (), 0)) };
 };
 
-
-
-
-
-
-template <class _TypeT, class _TypeU, bool = __rw_is_array<_TypeT>::value,
-                                      bool = __rw_is_function<_TypeT>::value>
+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
@@ -121,28 +174,31 @@
 };
 
 template <class _TypeT, class _TypeU>
-struct __rw_is_convertible_3<_TypeT,_TypeU,true,false>
+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;
+    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 };
+    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>
+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;
+    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 };
+    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>
+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
@@ -179,30 +235,35 @@
     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).
- */
+#  define _RWSTD_IS_CONVERTIBLE(T,U) \
+     _RW::__rw_is_convertible_1<T,U>::_C_value
+
+#elif defined (_MSC_VER)
+
+template <class _TypeT, class _TypeU>
+struct __rw_is_convertible_1
+{
+    enum { _C_value =
+         __rw_is_void<_TypeT>::value && __rw_is_void<_TypeU>::value
+      || _RWSTD_TT_IS_CONVERTIBLE(_TypeT, _TypeU) };
+};
+
+#  define _RWSTD_IS_CONVERTIBLE(T,U) \
+     _RW::__rw_is_convertible_1<T,U>::_C_value
+
+#else
+#  define _RWSTD_IS_CONVERTIBLE(T,U) _RWSTD_TT_IS_CONVERTIBLE(T,U)
+#endif // _RWSTD_TT_IS_CONVERTIBLE
+
 template <class _TypeT, class _TypeU>
 struct __rw_is_convertible
-#ifdef _RWSTD_TT_IS_CONVERTIBLE
-    : __rw_integral_constant<bool, _RWSTD_TT_IS_CONVERTIBLE(_TypeT,_TypeU)>
-#else
-    : __rw_integral_constant<bool,
-                             __rw_is_convertible_1<_TypeT, _TypeU>::_C_value>
-#endif
+    : __rw_integral_constant<bool, _RWSTD_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
 
 
diff --git a/include/rw/_meta_sign.h b/include/rw/_meta_sign.h
index 6c4ada0..4f773c7 100644
--- a/include/rw/_meta_sign.h
+++ b/include/rw/_meta_sign.h
@@ -38,10 +38,8 @@
 
 _RWSTD_NAMESPACE (__rw) {
 
-/**
- * Provides typedefs mapping non-boolean integral types to signed
- * and unsigned integral types of the same base type.
- */
+// Provides typedefs mapping non-boolean integral types to signed
+// and unsigned integral types of the same base type.
 template <class _TypeT>
 struct __rw_sign_helper
 {
@@ -71,7 +69,7 @@
 
 #  if (_RWSTD_WCHAR_SIZE == _RWSTD_CHAR_SIZE)
     typedef unsigned char _C_Uint;
-#  elif (_RWSTD_WCHAR_SIZE == _RWSTD_SHORT_SIZE)
+#  elif (_RWSTD_WCHAR_SIZE == _RWSTD_SHRT_SIZE)
     typedef unsigned short _C_Uint;
 #  elif (_RWSTD_WCHAR_SIZE == _RWSTD_INT_SIZE)
     typedef unsigned int _C_Uint;
@@ -85,7 +83,7 @@
 
 #  if (_RWSTD_WCHAR_SIZE == _RWSTD_CHAR_SIZE)
     typedef signed char _C_Sint;
-#  elif (_RWSTD_WCHAR_SIZE == _RWSTD_SHORT_SIZE)
+#  elif (_RWSTD_WCHAR_SIZE == _RWSTD_SHRT_SIZE)
     typedef signed short _C_Sint;
 #  elif (_RWSTD_WCHAR_SIZE == _RWSTD_INT_SIZE)
     typedef signed int _C_Sint;
@@ -177,10 +175,8 @@
 #endif // !_RWSTD_NO_LONG_LONG
 
 
-/**
- * Class template provides typedefs mapping enumeration types to integral
- * types of the same size.
- */
+// Class template provides typedefs mapping enumeration types
+// to integral types of the same size.
 template <_RWSTD_SIZE_T _Size>
 struct __rw_enum_helper
 {
@@ -233,18 +229,6 @@
 #  endif // _RWSTD_LONG_SIZE != _RWSTD_LLONG_SIZE
 #endif // !_RWSTD_NO_LONG_LONG
 
-/**
- * If _TypeT names a (possibly cv-qualified) signed integral type then the
- * member typedef type shall name the type _TypeT. Otherwise, if _TypeT
- * names a (possibly cv-qualified) unsigned integral type, then type shall
- * name the corresponding signed integral type with the same cv-qualifiers
- * as _TypeT. Otherwise, _TypeT shall name the signed integral type with
- * the smallest rank for which sizeof(_TypeT) == sizeof(_C_type), with the
- * same cv-qualifiers as _TypeT.
- *
- * note requires _TypeT shall be a (possibly cv-qualified) integral or
- * enum type, but not a bool type.
- */
 template <class _TypeT>
 struct __rw_make_signed
 {
@@ -276,20 +260,8 @@
     typedef _TypeU type;
 };
 
-//#define _RWSTD_MAKE_SIGNED(T) typename _RW::__rw_make_signed<T>::type
+#define _RWSTD_MAKE_SIGNED(T) _RW::__rw_make_signed<T>::type
 
-/**
- * If _TypeT names a (possibly cv-qualified) unsigned integral type then the
- * member typedef type shall name the type _TypeT. Otherwise, if _TypeT
- * names a (possibly cv-qualified) ununsigned integral type, then type shall
- * name the corresponding unsigned integral type with the same cv-qualifiers
- * as _TypeT. Otherwise, _TypeT shall name the unsigned integral type with
- * the smallest rank for which sizeof(_TypeT) == sizeof(_C_type), with the
- * same cv-qualifiers as _TypeT.
- *
- * note requires _TypeT shall be a (possibly cv-qualified) integral or
- * enum type, but not a bool type.
- */
 template <class _TypeT>
 struct __rw_make_unsigned
 {
@@ -321,7 +293,7 @@
     typedef _TypeU type;
 };
 
-//#define _RWSTD_MAKE_UNSIGNED(T) typename _RW::__rw_make_unsigned<T>::type
+#define _RWSTD_MAKE_UNSIGNED(T) _RW::__rw_make_unsigned<T>::type
 
 } // namespace __rw
 
diff --git a/include/rw/_rawiter.h b/include/rw/_rawiter.h
index 3deb6f9..ea294d1 100644
--- a/include/rw/_rawiter.h
+++ b/include/rw/_rawiter.h
@@ -71,7 +71,7 @@
     typedef _OutputIterator iterator_type;
 
     // 20.4.2, p2
-    _EXPLICIT raw_storage_iterator (iterator_type __x): _C_iter (__x) { }
+    explicit raw_storage_iterator (iterator_type __x): _C_iter (__x) { }
 
     // 20.4.2, p3
     raw_storage_iterator& operator* () {
diff --git a/include/rw/_ref_wrap.h b/include/rw/_ref_wrap.h
index f20e030..9417077 100644
--- a/include/rw/_ref_wrap.h
+++ b/include/rw/_ref_wrap.h
@@ -1,10 +1,12 @@
 // -*- C++ -*-
 /***************************************************************************
  *
+ * _ref_wrap.h - reference wrappers for <functional> header
+ *
  * This is an internal header file used to implement the C++ Standard
  * Library. It should never be #included directly by a program.
  *
- * $Id$
+ * $Id: _ref_wrap.h 673534 2008-07-02 22:49:15Z elemings $
  *
  ***************************************************************************
  *
@@ -24,8 +26,8 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 2008 Rogue Wave Software.
- * 
+ * Copyright 2008 Rogue Wave Software, Inc.
+ *
  **************************************************************************/
 
 #ifndef _RWSTD_RW_REF_WRAP_INCLUDED
@@ -33,31 +35,76 @@
 
 #  include <rw/_defs.h>
 
-#  if !defined _RWSTD_NO_EXT_CXX_0X
+
+_RWSTD_NAMESPACE (std) {
 
 
-_RWSTD_NAMESPACE (__rw) {
+// 20.5.5, class template reference_wrapper:
 
-
-/**
- * @class std::reference_wrapper
- *
- * Encapsulates a reference as an object.  This class template allows
- * references to be manipulated and behave as an ordinary object.
- *
- * @tparam Type A non-reference type.
- */
-
-template <class _Type>
-class __rw_ref_wrap
+template <class _TypeT>
+class reference_wrapper
 {
+    _TypeT* _C_ptr;
 
+public:
+
+    typedef _TypeT  type;
+
+    reference_wrapper (type& __x)
+        : _C_ptr (&__x) { /* empty */ }
+
+    reference_wrapper (const reference_wrapper& __x)
+        : _C_ptr (__x._C_ptr) { /* empty */ }
+
+    reference_wrapper& operator= (const reference_wrapper& __x) {
+        _RWSTD_ASSERT (0 != __x._C_ptr);
+        _C_ptr = __x._C_ptr;
+        return *this;
+    }
+
+    operator type& () const {
+        _RWSTD_ASSERT (0 != _C_ptr);
+        return *_C_ptr;
+    }
+
+    type& get() const {
+        _RWSTD_ASSERT (0 != _C_ptr);
+        return *_C_ptr;
+    }
 };
 
 
-}   // namespace __rw
+template <class _TypeT>
+inline reference_wrapper<_TypeT>
+ref (_TypeT& __x)
+{
+    return reference_wrapper<_TypeT> (__x);
+}
+
+template <class _TypeT>
+inline reference_wrapper<_TypeT>
+ref (reference_wrapper<_TypeT>& __x)
+{
+    return reference_wrapper<_TypeT> (__x);
+}
 
 
-#  endif   // !defined _RWSTD_NO_EXT_CXX_0X
+template <class _TypeT>
+inline reference_wrapper<const _TypeT>
+cref (const _TypeT& __x)
+{
+    return reference_wrapper<const _TypeT> (__x);
+}
+
+template <class _TypeT>
+inline reference_wrapper<const _TypeT>
+cref (reference_wrapper<const _TypeT>& __x)
+{
+    return reference_wrapper<const _TypeT> (__x);
+}
+
+
+}   // namespace std
+
 
 #endif   // _RWSTD_RW_REF_WRAP_INCLUDED
diff --git a/include/rw/_select.h b/include/rw/_select.h
index 4357c59..cee74c4 100644
--- a/include/rw/_select.h
+++ b/include/rw/_select.h
@@ -25,7 +25,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 1994-2005 Rogue Wave Software.
+ * Copyright 1994-2008 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -89,7 +89,7 @@
 
 #if !defined (__SUNPRO_CC) || __SUNPRO_CC > 0x530
 #  define _RWSTD_DISPATCH(iter)   \
-       (_TYPENAME _RW::__rw_select_int< iter >::_SelectT (1))
+       (typename _RW::__rw_select_int< iter >::_SelectT (1))
 
 #else
    // working around a SunPro 5.3 a prior bug (PR #28739)
@@ -100,14 +100,14 @@
 #ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC
 
 template <class _TypeT, class _TypeU>
-struct __rw_is_same
+struct __rw_same_type
 {
     typedef __rw_false_t _C_type;
     enum { _C_val };
 };
 
 template <class _TypeT>
-struct __rw_is_same<_TypeT, _TypeT>
+struct __rw_same_type<_TypeT, _TypeT>
 {
     typedef __rw_true_t _C_type;
     enum { _C_val = 1 };
@@ -128,7 +128,7 @@
 };
 
 template <class _TypeT, class _TypeU>
-struct __rw_is_same
+struct __rw_same_type
 {
     struct _C_yes {};
     struct _C_no { _C_yes no_ [2]; };
@@ -141,7 +141,7 @@
     enum { _C_val = sizeof (test (_C_Type<_TypeT> (),
                                   _C_Type<_TypeU> ())) == sizeof (_C_yes) };
 
-    typedef _TYPENAME __rw_bool_t<_C_val>::_C_type _C_type;
+    typedef typename __rw_bool_t<_C_val>::_C_type _C_type;
 };
 
 #endif   // _RWSTD_NO_CLASS_PARTIAL_SPEC
diff --git a/include/rw/_smartptr.h b/include/rw/_smartptr.h
index 59bea35..5b10ee9 100644
--- a/include/rw/_smartptr.h
+++ b/include/rw/_smartptr.h
@@ -177,7 +177,7 @@
     _TypeT  *_C_ptr;
 
     template <class _TypeU>
-    _EXPLICIT
+    explicit
     shared_ptr (const shared_ptr<_TypeU> &__rhs, const _TypeT*)
         : _C_pbody (__rhs._C_pbody) {
         if (_C_pbody)
@@ -193,7 +193,7 @@
     shared_ptr (): _C_pbody (0), _C_ptr (0) { }
 
     template <class _TypeU>
-    _EXPLICIT
+    explicit
     shared_ptr (_TypeU *__ptr)
         : _C_pbody (__ptr ? new _RW::__rw_ptr_body<_TypeU>(__ptr) : 0),
           _C_ptr (__ptr) { /* empty */ }
@@ -217,7 +217,7 @@
     }
 
     template <class _TypeU>
-    _EXPLICIT
+    explicit
     shared_ptr (const weak_ptr<_TypeU> &__rhs)
         : _C_pbody (__rhs._C_pbody), _C_ptr (__rhs._C_ptr) {
         if (_C_pbody) {
@@ -228,7 +228,7 @@
     }
 
     template <class _TypeU>
-    _EXPLICIT
+    explicit
     shared_ptr (auto_ptr<_TypeU>&);
 
     // [util.smartptr.shared.dest] destructor
@@ -312,7 +312,7 @@
         return _C_ptr;
     }
 
-    _TYPENAME _RW::__rw_nonvoid_ref<element_type>::_C_ref
+    typename _RW::__rw_nonvoid_ref<element_type>::_C_ref
     operator*() const {
         _RWSTD_ASSERT (0 != get ());
         return *get ();
diff --git a/include/rw/_specialized.h b/include/rw/_specialized.h
index dfd1956..f041f6b 100644
--- a/include/rw/_specialized.h
+++ b/include/rw/_specialized.h
@@ -56,7 +56,7 @@
 
 
 #ifndef _RWSTD_NO_NONDEDUCED_CONTEXT
-#  define _RWSTD_CONTAINER_SIZE_TYPE _TYPENAME _Container::size_type
+#  define _RWSTD_CONTAINER_SIZE_TYPE typename _Container::size_type
 #else
 #  define _RWSTD_CONTAINER_SIZE_TYPE _RWSTD_SIZE_T
 #endif   // _RWSTD_NO_NONDEDUCED_CONTEXT
diff --git a/include/rw/_streamiter.h b/include/rw/_streamiter.h
index 505b12b..9e5a188 100644
--- a/include/rw/_streamiter.h
+++ b/include/rw/_streamiter.h
@@ -79,7 +79,7 @@
     typedef basic_istream<char_type, traits_type> istream_type;
 
     // for convenience
-    typedef _TYPENAME _C_base::value_type         value_type;
+    typedef typename _C_base::value_type         value_type;
 
     // 24.5.1.1, p1
     istream_iterator (): _C_strm (0) { }
diff --git a/include/rw/_stringio.cc b/include/rw/_stringio.cc
index 8a29c89..27b4126 100644
--- a/include/rw/_stringio.cc
+++ b/include/rw/_stringio.cc
@@ -38,7 +38,7 @@
 {
     _RWSTD_ASSERT (0 != __is.rdbuf ());
 
-    const _TYPENAME basic_istream<_CharT, _Traits>::sentry
+    const typename basic_istream<_CharT, _Traits>::sentry
         __ipfx (__is /* , noskipws = false */);
 
     ios_base::iostate __err = ios_base::goodbit;
@@ -82,7 +82,7 @@
                     const _CharT* __pdel = __gptr;
                     for (/**/; __pdel != __egptr; ++__pdel) {
 
-                        const _TYPENAME _Traits::int_type
+                        const typename _Traits::int_type
                             __c = _Traits::to_int_type(*__pdel);
 
                         if (_Traits::eq_int_type (__c, _Traits::eof ())) {
@@ -134,7 +134,7 @@
 
                     // n data in buffer, trigger underflow()
                     // note that streambuf may be unbuffered
-                    const _TYPENAME _Traits::int_type
+                    const typename _Traits::int_type
                         __c = __rdbuf->sgetc ();
 
                     if (_Traits::eq_int_type (__c, _Traits::eof ())) {
@@ -143,7 +143,7 @@
                     }
 
                     // convert to char_type so that isspace works correctly
-                    const _TYPENAME _Traits::char_type
+                    const typename _Traits::char_type
                         __ch = _Traits::to_char_type (__c);
 
                     if (__ctp.is (__ctp.space, __ch))
@@ -166,7 +166,7 @@
 
             for ( ; __n != 0; ) {
 
-                const _TYPENAME _Traits::int_type
+                const typename _Traits::int_type
                     __c (__rdbuf->sgetc ());
 
                 if (_Traits::eq_int_type (__c, _Traits::eof ())) {
@@ -175,7 +175,7 @@
                 }
 
                 // convert to char_type so that isspace works correctly
-                const _TYPENAME _Traits::char_type
+                const typename _Traits::char_type
                     __ch = _Traits::to_char_type (__c);
 
                 if (__ctp.is (__ctp.space, __ch))
@@ -221,7 +221,7 @@
 {
     _RWSTD_ASSERT (0 != __is.rdbuf ());
 
-    const _TYPENAME basic_istream<_CharT, _Traits>::sentry
+    const typename basic_istream<_CharT, _Traits>::sentry
         __ipfx (__is, true /* noskipws */);
 
 #ifndef _RWSTD_NO_FRIEND_TEMPLATE
@@ -247,7 +247,7 @@
 
             for ( ; ; ) {
 
-                typedef _TYPENAME _Traits::int_type int_type;
+                typedef typename _Traits::int_type int_type;
 
                 const _CharT* const __gptr  = __rdbuf->gptr ();
                 const _CharT* const __egptr = __rdbuf->egptr ();
@@ -350,12 +350,12 @@
             // FIXME: code commented out to work around an HP aCC 3.14.10
             // bug #JAGac86264
 
-            // typedef _TYPENAME
+            // typedef typename
             //     basic_string<_CharT, _Traits, _Allocator>::size_type
 
             for ( ; ; ) {
 
-                const _TYPENAME _Traits::int_type
+                const typename _Traits::int_type
                     __c (__is.rdbuf ()->sgetc ());
 
                 if (_Traits::eq_int_type (__c, _Traits::eof ())) {
diff --git a/include/rw/_strref.h b/include/rw/_strref.h
index 217dcfa..a77f6c9 100644
--- a/include/rw/_strref.h
+++ b/include/rw/_strref.h
@@ -105,7 +105,7 @@
 {
     typedef _CharT                                            char_type;
     typedef _Allocator                                        allocator_type;
-    typedef _TYPENAME allocator_type::size_type               size_type;
+    typedef typename allocator_type::size_type               size_type;
     typedef _STD::basic_string<_CharT, _Traits, _Allocator>   string_type;
 
 #if     defined (_RWSTD_REENTRANT)              \
diff --git a/include/rw/_tree.cc b/include/rw/_tree.cc
index dbd1331..11647c4 100644
--- a/include/rw/_tree.cc
+++ b/include/rw/_tree.cc
@@ -169,7 +169,7 @@
 
 
 template <class _Key, class _Val, class _KeyOf, class _Comp, class _Alloc>
-_TYPENAME __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::iterator
+typename __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::iterator
 __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::
 _C_insert (_C_link_t __x, _C_link_t __y, const value_type &__v)
 {
@@ -177,8 +177,8 @@
     ++_C_size;
 
     // for notational convenience
-    const _TYPENAME _C_node_t::_C_color_t _Red   = _C_node_t::_C_red;
-    const _TYPENAME _C_node_t::_C_color_t _Black = _C_node_t::_C_black;
+    const typename _C_node_t::_C_color_t _Red   = _C_node_t::_C_red;
+    const typename _C_node_t::_C_color_t _Black = _C_node_t::_C_black;
     const _C_link_t                       _Null  = _C_link_t ();
 
     if (   __y == _C_end || _Null != __x
@@ -328,7 +328,7 @@
 
 
 template <class _Key, class _Val, class _KeyOf, class _Comp, class _Alloc>
-_TYPENAME __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::iterator 
+typename __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::iterator 
 __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::
 insert (iterator __it, const value_type &__v, bool __dup)
 {
@@ -399,7 +399,7 @@
 
 
 template <class _Key, class _Val, class _KeyOf, class _Comp, class _Alloc>
-_TYPENAME __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::iterator 
+typename __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::iterator 
 __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::erase (iterator __it)
 {
     _RWSTD_ASSERT_RANGE (begin (), __it);
@@ -422,8 +422,8 @@
         return end ();
 
     // for notational convenience
-    const _TYPENAME _C_node_t::_C_color_t _Red   = _C_node_t::_C_red;
-    const _TYPENAME _C_node_t::_C_color_t _Black = _C_node_t::_C_black;
+    const typename _C_node_t::_C_color_t _Red   = _C_node_t::_C_red;
+    const typename _C_node_t::_C_color_t _Black = _C_node_t::_C_black;
     const _C_link_t                       _Null  = _C_link_t ();
 
     // returned iterator pointing to the element just past `it'
@@ -762,7 +762,7 @@
 
 
 template <class _Key, class _Val, class _KeyOf, class _Comp, class _Alloc>
-_TYPENAME __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::size_type 
+typename __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::size_type 
 __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::
 erase (const key_type &__x)
 {
@@ -777,7 +777,7 @@
 
 
 template <class _Key, class _Val, class _KeyOf, class _Comp, class _Alloc>
-_TYPENAME __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::_C_link_t 
+typename __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::_C_link_t 
 __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::
 _C_copy (_C_link_t __x, _C_link_t __p)
 {
@@ -818,7 +818,7 @@
 
 
 template <class _Key, class _Val, class _KeyOf, class _Comp, class _Alloc>
-_TYPENAME __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::iterator 
+typename __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::iterator 
 __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::
 erase (iterator __first, iterator __last)
 {
@@ -851,7 +851,7 @@
 
 
 template <class _Key, class _Val, class _KeyOf, class _Comp, class _Alloc>
-_TYPENAME __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::iterator 
+typename __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::iterator 
 __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::
 find (const key_type &__k)
 {
@@ -863,7 +863,7 @@
 
 
 template <class _Key, class _Val, class _KeyOf, class _Comp, class _Alloc>
-_TYPENAME __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::iterator 
+typename __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::iterator 
 __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::
 lower_bound (const key_type &__k)
 {
@@ -884,7 +884,7 @@
 
 
 template <class _Key, class _Val, class _KeyOf, class _Comp, class _Alloc>
-_TYPENAME __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::iterator 
+typename __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::iterator 
 __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::
 upper_bound (const key_type &__k)
 {
@@ -904,12 +904,12 @@
 
 
 template <class _Key, class _Val, class _KeyOf, class _Comp, class _Alloc>
-_TYPENAME __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::size_type
+typename __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::size_type
 __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::
 _C_depth (const_iterator __it, size_type *__rank /* = 0 */) const
 {
     // for notational convenience
-    const _TYPENAME _C_node_t::_C_color_t _Black = _C_node_t::_C_black;
+    const typename _C_node_t::_C_color_t _Black = _C_node_t::_C_black;
     const _C_link_t                       _Null  = _C_link_t ();
 
     const _C_link_t __node = _ITER_NODE (__it);
@@ -919,7 +919,7 @@
 
 #ifdef _RWSTDDEBUG
 
-    const _TYPENAME _C_node_t::_C_color_t _Red = _C_node_t::_C_red;
+    const typename _C_node_t::_C_color_t _Red = _C_node_t::_C_red;
 
     if (_Red == __node->_C_color) {
 
@@ -975,7 +975,7 @@
 
 
 template <class _Key, class _Val, class _KeyOf, class _Comp, class _Alloc>
-_TYPENAME __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::size_type
+typename __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::size_type
 __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::
 _C_level (const_iterator __it) const
 {
diff --git a/include/rw/_tree.h b/include/rw/_tree.h
index 67236c2..fbf31a7 100644
--- a/include/rw/_tree.h
+++ b/include/rw/_tree.h
@@ -87,8 +87,8 @@
     typedef _RWSTD_REBIND (allocator_type, __rw_rb_tree_node) _C_node_alloc_t;
     typedef _RWSTD_REBIND (allocator_type, _Key)              _C_key_alloc_t;
 
-    typedef _TYPENAME _C_node_alloc_t::pointer             _C_link_t;
-    typedef _TYPENAME _C_key_alloc_t::const_reference      _C_const_key_ref;
+    typedef typename _C_node_alloc_t::pointer             _C_link_t;
+    typedef typename _C_key_alloc_t::const_reference      _C_const_key_ref;
 
     _C_color_t _C_color; 
     _C_link_t  _C_parent;
@@ -128,14 +128,14 @@
                            _TypeT, _DiffT, _Pointer, _Reference> _C_iter_base;
 public:
 
-    typedef _TYPENAME _C_iter_base::value_type        value_type;
-    typedef _TYPENAME _C_iter_base::difference_type   difference_type;
-    typedef _TYPENAME _C_iter_base::pointer           pointer;
-    typedef _TYPENAME _C_iter_base::reference         reference;
-    typedef _TYPENAME _C_iter_base::iterator_category iterator_category;
+    typedef typename _C_iter_base::value_type        value_type;
+    typedef typename _C_iter_base::difference_type   difference_type;
+    typedef typename _C_iter_base::pointer           pointer;
+    typedef typename _C_iter_base::reference         reference;
+    typedef typename _C_iter_base::iterator_category iterator_category;
     typedef _Node                                     _C_node_t;
-    typedef _TYPENAME _C_node_t::allocator_type       allocator_type;
-    typedef _TYPENAME _C_node_t::_C_link_t            _C_link_t;
+    typedef typename _C_node_t::allocator_type       allocator_type;
+    typedef typename _C_node_t::_C_link_t            _C_link_t;
 
     typedef const value_type*                         const_pointer; 
     typedef const value_type&                         const_reference; 
@@ -263,7 +263,7 @@
     typedef _RWSTD_ALLOC_TYPE (_Alloc,_Val)            _C_val_alloc_t;
     typedef _RWSTD_REBIND (_Alloc, _Key)               _C_key_alloc_t;
     typedef _RWSTD_REBIND (_Alloc, _C_node_t)          _C_node_alloc_t;
-    typedef _TYPENAME _C_node_alloc_t::pointer         _C_link_t;
+    typedef typename _C_node_alloc_t::pointer         _C_link_t;
 
 public:
     
@@ -272,12 +272,12 @@
     typedef _Comp                                      key_compare;
     typedef _Alloc                                     allocator_type;
       
-    typedef _TYPENAME _C_val_alloc_t::pointer          pointer;
-    typedef _TYPENAME _C_val_alloc_t::const_pointer    const_pointer;
-    typedef _TYPENAME allocator_type::size_type        size_type;
-    typedef _TYPENAME allocator_type::difference_type  difference_type;
-    typedef _TYPENAME _C_val_alloc_t::reference        reference;
-    typedef _TYPENAME _C_val_alloc_t::const_reference  const_reference;
+    typedef typename _C_val_alloc_t::pointer          pointer;
+    typedef typename _C_val_alloc_t::const_pointer    const_pointer;
+    typedef typename allocator_type::size_type        size_type;
+    typedef typename allocator_type::difference_type  difference_type;
+    typedef typename _C_val_alloc_t::reference        reference;
+    typedef typename _C_val_alloc_t::const_reference  const_reference;
     
 private:
 
@@ -333,15 +333,15 @@
 
     struct _C_node_buf {
         typedef _RWSTD_REBIND (allocator_type, _C_node_buf) _C_buf_alloc_t;
-        typedef _TYPENAME _C_buf_alloc_t::pointer           _C_buf_ptr_t;
+        typedef typename _C_buf_alloc_t::pointer           _C_buf_ptr_t;
         
         _C_buf_ptr_t _C_next_buffer;
         size_type    size;
         _C_link_t    _C_buffer;
     };
 
-    typedef _TYPENAME _C_node_buf::_C_buf_alloc_t _C_buf_alloc_t;
-    typedef _TYPENAME _C_node_buf::_C_buf_ptr_t   _C_buf_ptr_t;
+    typedef typename _C_node_buf::_C_buf_alloc_t _C_buf_alloc_t;
+    typedef typename _C_node_buf::_C_buf_ptr_t   _C_buf_ptr_t;
 
     _C_buf_ptr_t _C_buf_list;
     _C_link_t    _C_free_list;
@@ -819,7 +819,7 @@
 
 
 template <class _Key, class _Val, class _KeyOf, class _Comp, class _Alloc>
-inline _TYPENAME __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::size_type 
+inline typename __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::size_type 
 __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::
 count (const _Key& __k) const
 {
@@ -830,7 +830,7 @@
 
 
 #define _RWSTD_RB_TREE_ITER \
-        _TYPENAME __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::iterator
+        typename __rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::iterator
                                                
 template <class _Key, class _Val, class _KeyOf, class _Comp, class _Alloc>
 inline _STD::pair<_RWSTD_RB_TREE_ITER , _RWSTD_RB_TREE_ITER >
diff --git a/include/rw/_tuple.h b/include/rw/_tuple.h
index ac2ebb4..ce1290b 100644
--- a/include/rw/_tuple.h
+++ b/include/rw/_tuple.h
@@ -1,12 +1,12 @@
 // -*- C++ -*-
 /***************************************************************************
  *
- * _tuple.h - tuple class template and specializations
+ * _tuple.h - internal class template and helpers for <tuple> header
  *
  * This is an internal header file used to implement the C++ Standard
  * Library. It should never be #included directly by a program.
  *
- * $Id$
+ * $Id: _tuple.h 677985 2008-07-18 18:05:55Z elemings $
  *
  ***************************************************************************
  *
@@ -26,7 +26,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 2008 Rogue Wave Software.
+ * Copyright 2008 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -35,325 +35,209 @@
 
 #  include <rw/_defs.h>
 
-#  if !defined _RWSTD_NO_EXT_CXX_0X
+#  include <rw/_allocator.h>        // for std::allocator_arg_t
+#  include <rw/_forward.h>          // for _RWSTD_FORWARD, _RWSTD_MOVE
+#  include <rw/_meta_other.h>       // for _RWSTD_DECAY
 
-#    include <rw/_allocator.h>      // for std::allocator_arg_t
-#    include <rw/_forward.h>        // for std::forward, _RWSTD_MOVE
-#    include <rw/_pair.h>           // for std::pair
-
-
-#    if !defined _RWSTD_NO_VARIADIC_TEMPLATES
 
 _RWSTD_NAMESPACE (std) {
 
+template <class _TypeT>
+class reference_wrapper;
 
-// 20.3.1, class template tuple:
+}   // namespace std
 
-/**
- * A fixed-size collection of values with variable, heterogenous types.
- * This class template is used to instantatiate tuple types.  A tuple
- * type specifies zero or more element types for defining tuple values.
- * A tuple value can be constructed from a tuple type that holds one
- * value for each element type in the tuple.
- *
- * By definition, a homogenous tuple is a tuple that has the exact same
- * number and type of elements as another tuple type.  A heterogenous
- * tuple is just the opposite: a tuple type that has either a different
- * number of element types or one or more different element types.
- *
- * @tparam Types A list of zero or more types.  No applicable type
- *               requirements or restrictions.
- */
-template < class... Types >
-class tuple;
 
-/**
- * @internal
- * The template specialization for empty tuples.  This specialization
- * also serves as the terminating instantiation of a recursive tuple
- * with one or more element types.
- */
+_RWSTD_NAMESPACE (__rw) {
+
+
+// internal tuple class template
+
+#  if !defined _RWSTD_NO_VARIADIC_TEMPLATES
+
+template <class... _TypesT>
+class __rw_tuple;
+
 _RWSTD_SPECIALIZED_CLASS
-class tuple< >
+class __rw_tuple<>
 {
     // empty
 };
 
-/**
- * @internal
- * The basic template specialization for most tuples.  This class
- * template is used to instantiate all tuple types except for empty
- * tuples and tuples with exactly two element types.
- *
- * @tparam _HeadT First element type (required).
- * @tparam _TailT Zero or more additional element types.
- */
-template < class _HeadT, class... _TailT >
-class tuple< _HeadT, _TailT... >
-    : tuple< _TailT... >
+template <class _HeadT, class... _TailT>
+class __rw_tuple<_HeadT, _TailT...>
+    : public __rw_tuple<_TailT...>
 {
-    typedef tuple< _TailT... >  _Base;
+    typedef __rw_tuple<_TailT...>   _Base;
 
-protected:
-
-    _HeadT        _C_head;
-
-    _Base&        _C_tail ()       { return *this; }
-    const _Base&  _C_tail () const { return *this; }
+    _HeadT  _C_data;
 
 public:
 
-    _HeadT&       __get ()       { return _C_head; }
-    const _HeadT& __get () const { return _C_head; }
+    __rw_tuple ()
+        : _Base (), _C_data () { /* empty */ }
 
-    /**
-     * Construct tuple with default values.
-     */
-    tuple ()
-        : _Base (), _C_head () { /* empty */ }
-
-    /**
-     * Copy construct tuple from a different tuple value.
-     * @param __tuple Another tuple value with same type.
-     */
-    tuple (const tuple& __tuple)
+    __rw_tuple (const __rw_tuple& __tuple)
         : _Base (__tuple._C_tail ())
-        , _C_head (__tuple._C_head) { /* empty */ }
+        , _C_data (__tuple._C_data) { /* empty */ }
 
-    /**
-     * Copy assign tuple from a different tuple value.
-     * @param __tuple Some other tuple value.
-     * @param __tuple Another tuple value with same type.
-     * @return This tuple value.
-     */
-    tuple& operator= (const tuple& __tuple) {
+    __rw_tuple& operator= (const __rw_tuple& __tuple) {
         _Base::operator= (__tuple._C_tail ());
-        _C_head = __tuple._C_head;
+        _C_data = __tuple._C_data;
         return *this;
     }
 
-    /**
-     * Copy construct tuple from element values.  This explicit
-     * constructor creates a tuple value from element values.
-     *
-     * @param __head A value corresponding to first tuple element type.
-     * @param __tail List of corresponding values of remaining tuple
-     *               element types.
-     */
-    _EXPLICIT
-    tuple (const _HeadT& __head, const _TailT&... __tail)
-        : _Base (__tail...), _C_head (__head) { /* empty */ }
+    explicit
+    __rw_tuple (const _HeadT& __head, const _TailT&... __tail)
+        : _Base (__tail...), _C_data (__head) { /* empty */ }
 
-#      if !defined _RWSTD_NO_RVALUE_REFERENCES
-
-    /**
-     * Construct tuple by moving a value from some other tuple value.
-     * This move constructor moves the value from the given tuple value
-     * into this tuple.
-     * @param __tuple Some other homogenous tuple value.
-     */
-    tuple (tuple&& __tuple)
-        : _Base (std::forward<_Base> (__tuple._C_tail ()))
-        , _C_head (_RWSTD_MOVE (__tuple._C_head)) { /* empty */ }
-
-    /**
-     * Assign tuple by moving a value from some other homogenous tuple.
-     * This assignment operator moves the value from the given tuple
-     * value into this tuple.
-     * @param __tuple Some other homogenous tuple value.
-     * @return Lvalue reference to this tuple value.
-     */
-    tuple& operator= (tuple&& __tuple) {
-        _Base::operator= (std::forward<_Base> (__tuple._C_tail ()));
-        _C_head = _RWSTD_MOVE (__tuple._C_head);
-        return *this;
-    }
-
-#      endif   // !defined _RWSTD_NO_RVALUE_REFERENCES
-
-    /**
-     * Construct tuple by copying a heterogenous tuple value.  This copy
-     * constructor copies the value from a compatible, heterogenous
-     * tuple.
-     * @tparam _HeadU First element type in tuple.
-     * @tparam _TailU Remaining element types in tuple.
-     * @param __tuple A compatible, heterogenous tuple value.
-     */
     template <class _HeadU, class... _TailU>
-    tuple (const tuple<_HeadU, _TailU...>& __tuple)
+    __rw_tuple (const __rw_tuple<_HeadU, _TailU...>& __tuple)
         : _Base (__tuple._C_tail ())
-        , _C_head (__tuple._C_head) { /* empty */ }
+        , _C_data (__tuple._C_head ()) { /* empty */ }
 
-    /**
-     * Assign tuple by copying a heterogenous tuple value.  This
-     * assignment operator copies the value from a compatible,
-     * heterogenous tuple.
-     * @tparam _HeadU First element type in tuple.
-     * @tparam _TailU Remaining element types in tuple.
-     * @param __tuple A compatible, heterogenous tuple value.
-     * @return Lvalue reference to this tuple value.
-     */
     template <class _HeadU, class... _TailU>
-    tuple& operator= (const tuple<_HeadU, _TailU...>& __tuple) {
+    __rw_tuple& operator= (const __rw_tuple<_HeadU, _TailU...>& __tuple) {
         _Base::operator= (__tuple._C_tail ());
-        _C_head = __tuple._C_head;
+        _C_data = __tuple._C_head ();
         return *this;
     }
 
-#      if !defined _RWSTD_NO_RVALUE_REFERENCES
+#    if !defined _RWSTD_NO_RVALUE_REFERENCES
 
-    /**
-     * Construct tuple by moving element values.  This explicit move
-     * constructor moves values from the corresponding element types.
-     * @tparam _HeadU First element type in other tuple.
-     * @tparam _TailU Remaining element types in other tuple.
-     * @param __head First value in element type list.
-     * @param __tail Remaining values in element type list.
-     */
-    template <class _HeadU, class... _TailU>
-    _EXPLICIT tuple (_HeadU&& __head, _TailU&&... __tail)
-        : _Base (std::forward<_TailU> (__tail)...)
-        , _C_head (_RWSTD_MOVE (__head)) { /* empty */ }
+    __rw_tuple (__rw_tuple&& __tuple)
+        : _Base (_STD::move<_Base&&> (__tuple._C_tail ()))
+        , _C_data (_RWSTD_FORWARD (_HeadT, __tuple._C_data)) { /* empty */ }
 
-    /**
-     * Construct tuple by moving a heterogenous tuple value.  This move
-     * constructor moves values from a heterogenous tuple into this
-     * tuple value.
-     * @tparam _HeadU First element type in other tuple.
-     * @tparam _TailU Remaining element types in other tuple.
-     * @param __tuple A compatible, heterogenous tuple value.
-     */
-    template <class _HeadU, class... _TailU>
-    tuple (tuple<_HeadU, _TailU...>&& __tuple)
-        : _Base (std::forward<_Base> (__tuple._C_tail ()))
-        , _C_head (_RWSTD_MOVE (__tuple._C_head)) { /* empty */ }
+    __rw_tuple& operator= (__rw_tuple&& __tuple) {
+        _Base::operator= (_RWSTD_FORWARD (_Base, __tuple._C_tail ()));
+        _C_data = _RWSTD_MOVE (__tuple._C_data);
+        return *this;
+    }
 
-    /**
-     * Assign tuple by moving a value from some other heterogenous tuple.
-     * This move assignment operator assigns a value to this tuple by
-     * moving values from a compatible, heterogenous tuple.
-     * @tparam _HeadU First element type in other tuple.
-     * @tparam _TailU Remaining element types in other tuple.
-     * @param __tuple A compatible, heterogenous tuple value.
-     * @return Lvalue reference to this tuple.
-     */
     template <class _HeadU, class... _TailU>
-    tuple& operator= (tuple<_HeadU, _TailU...>&& __tuple) {
-        _Base::operator= (std::forward<_Base> (__tuple._C_tail ()));
-        _C_head = _RWSTD_MOVE (__tuple._C_head);
+    explicit __rw_tuple (_HeadU&& __head, _TailU&&... __tail)
+        : _Base (_RWSTD_FORWARD (_TailU, __tail)...)
+        , _C_data (_RWSTD_MOVE (__head)) { /* empty */ }
+
+    template <class _HeadU, class... _TailU>
+    __rw_tuple (__rw_tuple<_HeadU, _TailU...>&& __tuple)
+        : _Base (_RWSTD_MOVE (__tuple._C_tail ()))
+        , _C_data (_RWSTD_MOVE (__tuple._C_head ())) { /* empty */ }
+
+    template <class _HeadU, class... _TailU>
+    __rw_tuple& operator= (__rw_tuple<_HeadU, _TailU...>&& __tuple) {
+        _Base::operator= (_RWSTD_MOVE (__tuple._C_tail ()));
+        _C_data = _RWSTD_MOVE (__tuple._C_head ());
         return *this;
     }
 
     // allocator-extended constructors:
 
     template <class _Alloc, class... _TypesU>
-    tuple (allocator_arg_t, const _Alloc& __alloc,
-           const _TypesU&&... __values);
+    __rw_tuple (_STD::allocator_arg_t, const _Alloc& __alloc,
+                const _TypesU&&... __values);
 
     template <class _Alloc>
-    tuple (allocator_arg_t, const _Alloc& __alloc,
-           tuple&& __tuple);
+    __rw_tuple (_STD::allocator_arg_t, const _Alloc& __alloc,
+                __rw_tuple&& __tuple);
 
     template <class _Alloc, class... _TypesU>
-    tuple (allocator_arg_t, const _Alloc& __alloc,
-           tuple<_TypesU...>&& __tuple);
+    __rw_tuple (_STD::allocator_arg_t, const _Alloc& __alloc,
+                __rw_tuple<_TypesU...>&& __tuple);
 
-#      endif   // !defined _RWSTD_NO_RVALUE_REFERENCES
+#    endif   // !defined _RWSTD_NO_RVALUE_REFERENCES
 
     template <class _Alloc>
-    tuple (allocator_arg_t, const _Alloc& __alloc);
+    __rw_tuple (_STD::allocator_arg_t, const _Alloc& __alloc);
 
     template <class _Alloc>
-    tuple (allocator_arg_t, const _Alloc& __alloc,
+    __rw_tuple (_STD::allocator_arg_t, const _Alloc& __alloc,
            const _HeadT& __head, const _TailT&... __tail);
 
     template <class _Alloc>
-    tuple (allocator_arg_t, const _Alloc& __alloc,
-           const tuple& __tuple);
+    __rw_tuple (_STD::allocator_arg_t, const _Alloc& __alloc,
+                const __rw_tuple& __tuple);
 
     template <class _Alloc, class... _TypesU>
-    tuple (allocator_arg_t, const _Alloc& __alloc,
-           const tuple<_TypesU...>& __tuple);
+    __rw_tuple (_STD::allocator_arg_t, const _Alloc& __alloc,
+                const __rw_tuple<_TypesU...>& __tuple);
+
+    // accessors:
+
+    _HeadT&         _C_head ()       { return _C_data; }
+    const _HeadT&   _C_head () const { return _C_data; }
+
+    _Base&          _C_tail ()       { return *this; }
+    const _Base&    _C_tail () const { return *this; }
 
 };
 
 
-/**
- * @internal
- * Template specialization for tuples with exactly two element types.
- * This specialization provides additional constructors and operators for
- * making class template \c std::pair implicitly compatible with tuples.
- * @tparam _TypeT1 First element type.
- * @tparam _TypeT2 Second element type.
- */
-template < class _TypeT1, class _TypeT2 >
-class tuple< _TypeT1, _TypeT2 >
+struct __rw_ignore
 {
-    _TypeT1 _C_first;
-    _TypeT2 _C_second;
-
-public:
-
-    tuple (): _C_first (), _C_second () { /* empty */ }
-
-    tuple (const tuple& __tuple)
-        : _C_first (__tuple._C_first)
-        , _C_second (__tuple._C_second) { /* empty */ }
-
-    tuple& operator= (const tuple& __tuple) {
-        _C_first = __tuple._C_first;
-        _C_second = __tuple._C_second;
-        return *this;
-    }
-
-    _EXPLICIT tuple (const _TypeT1& __t1, const _TypeT2& __t2)
-        : _C_first (__t1), _C_second (__t2) { /* empty */ }
-
-    template <class _TypeU1, class _TypeU2>
-    tuple (const pair<_TypeU1, _TypeU2>& __pair)
-        : _C_first (__pair.first), _C_second (__pair.second) { /* empty */ }
-
-    template <class _TypeU1, class _TypeU2>
-    tuple& operator= (const pair<_TypeU1, _TypeU2>& __pair) {
-        _C_first = __pair.first;
-        _C_second = __pair.second;
-        return *this;
-    }
-
-#      if !defined _RWSTD_NO_RVALUE_REFERENCES
-
-    template <class _TypeU1, class _TypeU2>
-    tuple (pair<_TypeU1, _TypeU2>&& __pair)
-        : _C_first (_RWSTD_MOVE (__pair.first))
-        , _C_second (_RWSTD_MOVE (__pair.second)) { /* empty */ }
-
-    template <class _TypeU1, class _TypeU2>
-    tuple& operator= (pair<_TypeU1, _TypeU2>&& __pair) {
-        _C_first = _RWSTD_MOVE (__pair.first);
-        _C_second = _RWSTD_MOVE (__pair.second);
-        return *this;
-    }
-
-    // allocator-extended constructors:
-
-    template <class _Alloc, class _TypeU1, class _TypeU2>
-    tuple (allocator_arg_t, const _Alloc& __alloc,
-           pair<_TypeU1, _TypeU2>&& __pair);
-
-#      endif   // !defined _RWSTD_NO_RVALUE_REFERENCES
-
-    template <class _Alloc, class _TypeU1, class _TypeU2>
-    tuple (allocator_arg_t, const _Alloc& __alloc,
-           const pair<_TypeU1, _TypeU2>& __pair);
-
+    template <class _TypeT>
+    void operator= (const _TypeT&) const {}
 };
 
 
-}   // namespace std
+template <class _TypeT>
+struct __rw_deduce_ref
+{
+    typedef _TypeT  _C_type;
+};
 
-#    endif   // !defined _RWSTD_NO_VARIADIC_TEMPLATES
+template <class _TypeT>
+struct __rw_deduce_ref<_STD::reference_wrapper<_TypeT> >
+{
+    typedef _TypeT& _C_type;
+};
 
-#  endif   // !defined _RWSTD_NO_EXT_CXX_0X
+template <class _TypeT>
+struct __rw_deduce_ref<const _STD::reference_wrapper<_TypeT> >
+{
+    typedef _TypeT& _C_type;
+};
+
+template <class _TypeT>
+struct __rw_make_tuple
+{
+    typedef typename _RWSTD_DECAY (_TypeT)                 _C_decay;
+    typedef typename __rw_deduce_ref<_C_decay>::_C_type    _C_type;
+};
+
+
+template <class...  _TypesT, class... _TypesU>
+bool operator== (const __rw_tuple<_TypesT...>& __x,
+                 const __rw_tuple<_TypesU...>& __y) {
+    return     (__x._C_head () == __y._C_head ())
+            && (__x._C_tail () == __y._C_tail ());
+}
+
+_RWSTD_SPECIALIZED_FUNCTION
+bool operator== (const __rw_tuple<>& /*__x*/,
+                 const __rw_tuple<>& /*__y*/) {
+    return true;
+}
+
+template <class...  _TypesT, class... _TypesU>
+bool operator< (const __rw_tuple<_TypesT...>& __x,
+                const __rw_tuple<_TypesU...>& __y) {
+    return     (__x._C_head () < __y._C_head ())
+            || (  !(__y._C_head () < __x._C_head ())
+                && (__x._C_tail () < __y._C_tail ()));
+}
+
+_RWSTD_SPECIALIZED_FUNCTION
+bool operator< (const __rw_tuple<>& /*__x*/,
+                const __rw_tuple<>& /*__y*/) {
+    return false;
+}
+
+#  endif   // !defined _RWSTD_NO_VARIADIC_TEMPLATES
+
+
+}   // namespace __rw
+
 
 #endif   // _RWSTD_TUPLE_INCLUDED
-
diff --git a/include/rw/_tuple_traits.h b/include/rw/_tuple_traits.h
index 6d582c7..4d4cb12 100644
--- a/include/rw/_tuple_traits.h
+++ b/include/rw/_tuple_traits.h
@@ -38,9 +38,6 @@
 #    include <rw/_meta_help.h>  // for __rw_true_type
 
 
-/// @ingroup tuple
-/// @{
-
 _RWSTD_NAMESPACE (std) {
 
 
@@ -49,14 +46,6 @@
 template <class _Type, class _Alloc>
 struct uses_allocator;
 
-/**
- * Allows tuple construction with an allocator.  This trait informs
- * other library components that tuple can be constructed with an
- * allocator even though it does not have a nested allocator_type.
- *
- * @tparam _Types List of element types in tuple.
- * @tparam _Alloc Must conform to Allocator requirements (20.1.2).
- */
 template <class... _Types, class _Alloc> 
 struct uses_allocator<tuple<_Types...>, _Alloc>
     : _RW::__rw_true_type
@@ -68,13 +57,6 @@
 template <class _Type>
 struct constructible_with_allocator_prefix;
 
-/**
- * Allows tuple construction with an allocator prefix argument.  This
- * trait informs other library components that tuple can be constructed
- * with an allocator prefix argument.
- *
- * @tparam _Types List of element types in tuple.
- */
 template <class... _Types> 
 struct constructible_with_allocator_prefix<tuple<_Types...> > 
     : _RW::__rw_true_type
@@ -83,8 +65,6 @@
 }; 
 
 
-/// @}
-
 }   // namespace std
 
 
diff --git a/include/rw/_typetraits.h b/include/rw/_typetraits.h
index fc55b30..d042407 100644
--- a/include/rw/_typetraits.h
+++ b/include/rw/_typetraits.h
@@ -236,7 +236,7 @@
 #else
 
     // prevent references from causing an error
-    typedef _TYPENAME __rw_is_reference<_TypeT>::_C_type _C_type;
+    typedef typename __rw_is_reference<_TypeT>::_C_type _C_type;
 
     // working around an HP aCC bug (see PR #25347)
     // NOTE: this fails for classes due to another bug (PR #25384)
@@ -267,12 +267,12 @@
 template <class _TypeT>
 struct __rw_type_traits
 {
-    typedef _TYPENAME __rw_is_const<_TypeT>::_C_type     _C_non_const_type;
-    typedef _TYPENAME __rw_is_volatile<_TypeT>::_C_type  _C_non_volatile_type;
-    typedef _TYPENAME __rw_is_pointer<_TypeT>::_C_type   _C_non_pointer_type;
-    typedef _TYPENAME __rw_is_reference<_TypeT>::_C_type _C_non_reference_type;
+    typedef typename __rw_is_const<_TypeT>::_C_type     _C_non_const_type;
+    typedef typename __rw_is_volatile<_TypeT>::_C_type  _C_non_volatile_type;
+    typedef typename __rw_is_pointer<_TypeT>::_C_type   _C_non_pointer_type;
+    typedef typename __rw_is_reference<_TypeT>::_C_type _C_non_reference_type;
 
-    typedef _TYPENAME __rw_is_cv_qualified<_TypeT>::_C_type
+    typedef typename __rw_is_cv_qualified<_TypeT>::_C_type
     _C_non_cv_qualified_type;
 
     enum {
diff --git a/include/set b/include/set
index 3c909a3..68b2a6c 100644
--- a/include/set
+++ b/include/set
@@ -98,27 +98,24 @@
         // const iterators. This is intentional, the purpose is to
         // prevent the modification of a set element after it has
         // been inserted.
-    typedef _TYPENAME __rep_type::reference               reference;
-    typedef _TYPENAME __rep_type::const_reference         const_reference;
-    typedef _TYPENAME __rep_type::const_iterator          iterator;
-    typedef _TYPENAME __rep_type::const_iterator          const_iterator;
-    typedef _TYPENAME __rep_type::size_type               size_type;
-    typedef _TYPENAME __rep_type::difference_type         difference_type;
-    typedef _TYPENAME __rep_type::pointer                 pointer;
-    typedef _TYPENAME __rep_type::const_pointer           const_pointer;
-#if !defined (_RWSTD_NO_MEMBER_TEMPLATES)
-    typedef _TYPENAME __rep_type::const_reverse_iterator  reverse_iterator;
-#else
-    typedef _TYPENAME __rep_type::reverse_iterator        reverse_iterator;
-#endif
-    typedef _TYPENAME __rep_type::const_reverse_iterator
+    typedef typename __rep_type::reference               reference;
+    typedef typename __rep_type::const_reference         const_reference;
+    typedef typename __rep_type::const_iterator          iterator;
+    typedef typename __rep_type::const_iterator          const_iterator;
+    typedef typename __rep_type::size_type               size_type;
+    typedef typename __rep_type::difference_type         difference_type;
+    typedef typename __rep_type::pointer                 pointer;
+    typedef typename __rep_type::const_pointer           const_pointer;
+    typedef typename __rep_type::const_reverse_iterator  reverse_iterator;
+    typedef typename __rep_type::const_reverse_iterator
         const_reverse_iterator;
 
     //
     // construct/copy/destroy
     //
-    _EXPLICIT set (const key_compare    &__cmp   = key_compare (),
-                   const allocator_type &__alloc = allocator_type ())
+    explicit
+    set (const key_compare    &__cmp   = key_compare (),
+         const allocator_type &__alloc = allocator_type ())
         : _C_rep (__cmp, __alloc) { }
 
     template<class _InputIter>
@@ -161,7 +158,7 @@
     // modifiers
     //
     pair<iterator, bool> insert (const value_type& __x) {
-        const pair<_TYPENAME __rep_type::iterator, bool> __p =
+        const pair<typename __rep_type::iterator, bool> __p =
             _C_rep.insert (__x, false); 
         return pair<iterator, bool>(__p.first, __p.second);
     }
@@ -184,18 +181,18 @@
 
     // working around MSVC bugs
     iterator insert (iterator __it, const value_type& __x) {
-        typedef _TYPENAME __rep_type::iterator _Iterator;
+        typedef typename __rep_type::iterator _Iterator;
         return _RWSTD_REINTERPRET_CAST (iterator&, _C_rep.insert (
                    _RWSTD_REINTERPRET_CAST (_Iterator&, __it), __x, false));
     }
 
     void erase (iterator __it) {
-        typedef _TYPENAME __rep_type::iterator _Iterator;
+        typedef typename __rep_type::iterator _Iterator;
         _C_rep.erase (_RWSTD_REINTERPRET_CAST (_Iterator&, __it));
     }
 
     void erase (iterator __first, iterator __last) {
-        typedef _TYPENAME __rep_type::iterator _Iterator;
+        typedef typename __rep_type::iterator _Iterator;
         _C_rep.erase (_RWSTD_REINTERPRET_CAST (_Iterator&, __first),
                       _RWSTD_REINTERPRET_CAST (_Iterator&, __last));
     }
@@ -303,22 +300,22 @@
     //
     // types
     //
-    typedef _TYPENAME __rep_type::reference               reference;
-    typedef _TYPENAME __rep_type::const_reference         const_reference;
-    typedef _TYPENAME __rep_type::iterator                iterator;
-    typedef _TYPENAME __rep_type::const_iterator          const_iterator;
-    typedef _TYPENAME __rep_type::size_type               size_type;
-    typedef _TYPENAME __rep_type::difference_type         difference_type;
-    typedef _TYPENAME __rep_type::pointer                 pointer;
-    typedef _TYPENAME __rep_type::const_pointer           const_pointer;
-    typedef _TYPENAME __rep_type::reverse_iterator        reverse_iterator;
-    typedef _TYPENAME __rep_type::const_reverse_iterator
+    typedef typename __rep_type::reference               reference;
+    typedef typename __rep_type::const_reference         const_reference;
+    typedef typename __rep_type::iterator                iterator;
+    typedef typename __rep_type::const_iterator          const_iterator;
+    typedef typename __rep_type::size_type               size_type;
+    typedef typename __rep_type::difference_type         difference_type;
+    typedef typename __rep_type::pointer                 pointer;
+    typedef typename __rep_type::const_pointer           const_pointer;
+    typedef typename __rep_type::reverse_iterator        reverse_iterator;
+    typedef typename __rep_type::const_reverse_iterator
             const_reverse_iterator;
 
     //
     // construct/copy/destroy
     //
-    _EXPLICIT
+    explicit
     multiset (const key_compare &__cmp = key_compare (),
               const allocator_type &__alloc = allocator_type ())
         : _C_rep (__cmp, __alloc) { }
diff --git a/include/sstream b/include/sstream
index 11de4f3..cf6d335 100644
--- a/include/sstream
+++ b/include/sstream
@@ -103,22 +103,22 @@
     typedef _Traits                         traits_type;
     typedef _Allocator                      allocator_type;   // lwg issue 251
 
-    typedef _TYPENAME traits_type::int_type int_type;
-    typedef _TYPENAME traits_type::pos_type pos_type;
-    typedef _TYPENAME traits_type::off_type off_type;
+    typedef typename traits_type::int_type int_type;
+    typedef typename traits_type::pos_type pos_type;
+    typedef typename traits_type::off_type off_type;
 
-    _EXPLICIT
+    explicit
     basic_stringbuf (ios_base::openmode __mode = _RW::__rw_in_out)
         : basic_streambuf<char_type, traits_type>(__mode) {
         this->_C_own_buf (true);
     }
 
-    _EXPLICIT
+    explicit
     basic_stringbuf (const _C_string_type&,
                      ios_base::openmode = _RW::__rw_in_out);
 
     // undetectable extension
-    _EXPLICIT
+    explicit
     basic_stringbuf (const char_type*,
                      ios_base::openmode = _RW::__rw_in_out);
 
@@ -238,23 +238,23 @@
     typedef _Traits                          traits_type;
     typedef _Allocator                       allocator_type;
 
-    typedef _TYPENAME traits_type::int_type  int_type;
-    typedef _TYPENAME traits_type::pos_type  pos_type;
-    typedef _TYPENAME traits_type::off_type  off_type;
+    typedef typename traits_type::int_type  int_type;
+    typedef typename traits_type::pos_type  pos_type;
+    typedef typename traits_type::off_type  off_type;
   
-    _EXPLICIT
+    explicit
     basic_istringstream (ios_base::openmode __mode = ios_base::in)
         : basic_istream<char_type, traits_type>(rdbuf ()),
           _C_sb (__mode | ios_base::in) { }
 
-    _EXPLICIT
+    explicit
     basic_istringstream (const _C_string_type& __str, 
                          ios_base::openmode __mode = ios_base::in)
         : basic_istream<char_type, traits_type>(rdbuf ()),
           _C_sb (__str, __mode | ios_base::in) { }
 
     // undetectable extension
-    _EXPLICIT
+    explicit
     basic_istringstream (const char_type   * __s, 
                          ios_base::openmode __mode = ios_base::in)
         : basic_istream<char_type, traits_type>(rdbuf ()),
@@ -306,25 +306,25 @@
     typedef _Traits                         traits_type;
     typedef _Allocator                      allocator_type;
 
-    typedef _TYPENAME traits_type::int_type int_type;
-    typedef _TYPENAME traits_type::pos_type pos_type;
-    typedef _TYPENAME traits_type::off_type off_type;
+    typedef typename traits_type::int_type int_type;
+    typedef typename traits_type::pos_type pos_type;
+    typedef typename traits_type::off_type off_type;
 
     // NOTE: the constructors pass the address of a yet uninitialized
     //       data member to the constructor of the base class
-    _EXPLICIT
+    explicit
     basic_ostringstream (ios_base::openmode __mode = ios_base::out)
         : basic_ostream<char_type, traits_type> (rdbuf ()),
           _C_sb (__mode | ios_base::out) { }
         
-    _EXPLICIT
+    explicit
     basic_ostringstream (const _C_string_type  &__str, 
                          ios_base::openmode  __mode = ios_base::out)
         : basic_ostream<char_type, traits_type>(rdbuf ()),
           _C_sb (__str, __mode | ios_base::out) { }
 
     // undetectable extension
-    _EXPLICIT
+    explicit
     basic_ostringstream (const char_type    *__s, 
                          ios_base::openmode  __mode = ios_base::out)
         : basic_ostream<char_type, traits_type>(rdbuf ()),
@@ -376,23 +376,23 @@
     typedef _Traits                         traits_type;
     typedef _Allocator                      allocator_type;
 
-    typedef _TYPENAME traits_type::int_type int_type;
-    typedef _TYPENAME traits_type::pos_type pos_type;
-    typedef _TYPENAME traits_type::int_type off_type;
+    typedef typename traits_type::int_type int_type;
+    typedef typename traits_type::pos_type pos_type;
+    typedef typename traits_type::int_type off_type;
 
-    _EXPLICIT
+    explicit
     basic_stringstream (ios_base::openmode __mode = _RW::__rw_in_out)
         : basic_iostream<char_type, traits_type>(rdbuf ()),
           _C_sb (__mode) { }
 
-    _EXPLICIT
+    explicit
     basic_stringstream (const _C_string_type &__str,
                         ios_base::openmode __mode = _RW::__rw_in_out)
         : basic_iostream<char_type, traits_type>(rdbuf ()),
           _C_sb (__str, __mode) { }
 
     // undetectable extension
-    _EXPLICIT
+    explicit
     basic_stringstream (const char_type    *__s, 
                         ios_base::openmode __mode = _RW::__rw_in_out)
         : basic_iostream<char_type, traits_type>(rdbuf ()),
diff --git a/include/sstream.cc b/include/sstream.cc
index 5b253b0..7bd7805 100644
--- a/include/sstream.cc
+++ b/include/sstream.cc
@@ -250,7 +250,7 @@
 
 
 template <class _CharT, class _Traits, class _Allocator>
-/* virtual */ _TYPENAME basic_stringbuf<_CharT, _Traits, _Allocator>::int_type
+/* virtual */ typename basic_stringbuf<_CharT, _Traits, _Allocator>::int_type
 basic_stringbuf<_CharT, _Traits, _Allocator>::
 underflow ()
 {
@@ -276,7 +276,7 @@
 
 
 template<class _CharT, class _Traits, class _Allocator>
-_TYPENAME basic_stringbuf<_CharT, _Traits, _Allocator>::int_type
+typename basic_stringbuf<_CharT, _Traits, _Allocator>::int_type
 basic_stringbuf<_CharT, _Traits, _Allocator>::
 overflow (int_type __c)
 {
@@ -314,7 +314,7 @@
 
 
 template<class _CharT, class _Traits, class _Allocator>
-/* virtual */ _TYPENAME basic_stringbuf<_CharT, _Traits, _Allocator>::int_type
+/* virtual */ typename basic_stringbuf<_CharT, _Traits, _Allocator>::int_type
 basic_stringbuf<_CharT, _Traits, _Allocator>::
 pbackfail (int_type __c)
 {
@@ -404,7 +404,7 @@
 
 
 template<class _CharT, class _Traits, class _Allocator>
-/* virtual */ _TYPENAME basic_stringbuf<_CharT, _Traits, _Allocator>::pos_type
+/* virtual */ typename basic_stringbuf<_CharT, _Traits, _Allocator>::pos_type
 basic_stringbuf<_CharT, _Traits, _Allocator>::
 seekoff (off_type __off, ios_base::seekdir __way, ios_base::openmode __which)
 {
@@ -483,7 +483,7 @@
 
 
 template<class _CharT, class _Traits, class _Allocator>
-/* virtual */ _TYPENAME basic_stringbuf<_CharT, _Traits, _Allocator>::pos_type
+/* virtual */ typename basic_stringbuf<_CharT, _Traits, _Allocator>::pos_type
 basic_stringbuf<_CharT, _Traits, _Allocator>::
 seekpos (pos_type __pos, ios_base::openmode __which)
 {
diff --git a/include/stack b/include/stack
index 21cff2b..d31f78c 100644
--- a/include/stack
+++ b/include/stack
@@ -74,11 +74,11 @@
 public:
     
     typedef _Container                                container_type;
-    typedef _TYPENAME container_type::value_type      value_type;
-    typedef _TYPENAME container_type::size_type       size_type;
+    typedef typename container_type::value_type      value_type;
+    typedef typename container_type::size_type       size_type;
     // lwg issue 307: additional typedefs
-    typedef _TYPENAME container_type::reference       reference;
-    typedef _TYPENAME container_type::const_reference const_reference;
+    typedef typename container_type::reference       reference;
+    typedef typename container_type::const_reference const_reference;
 
 protected:
     
@@ -86,7 +86,7 @@
 
 public:
 
-    _EXPLICIT
+    explicit
     stack (const container_type &__c = container_type ()) 
         : c (__c) { }
 
diff --git a/include/stdexcept b/include/stdexcept
index 0bb8daf..91b48d8 100644
--- a/include/stdexcept
+++ b/include/stdexcept
@@ -45,11 +45,11 @@
 // 19.1.1
 struct _RWSTD_EXPORT logic_error: _RW::__rw_exception
 {
-    _EXPLICIT logic_error (const string& __str)
+    explicit logic_error (const string& __str)
         : _RW::__rw_exception (__str) { }
 
     // extension
-    _EXPLICIT logic_error (const char *__s = 0)
+    explicit logic_error (const char *__s = 0)
         : _RW::__rw_exception (__s) { }
 
     virtual ~logic_error () _THROWS (());
@@ -59,11 +59,11 @@
 // 19.1.2
 struct _RWSTD_EXPORT domain_error: logic_error
 {
-    _EXPLICIT domain_error (const string &__str)
+    explicit domain_error (const string &__str)
         : logic_error (__str) { }
 
     // extension
-    _EXPLICIT domain_error (const char *__s = 0)
+    explicit domain_error (const char *__s = 0)
         : logic_error (__s) { }
 
     virtual ~domain_error () _THROWS (());
@@ -73,11 +73,11 @@
 // 19.1.3
 struct _RWSTD_EXPORT invalid_argument: logic_error
 {
-    _EXPLICIT invalid_argument (const string &__str)
+    explicit invalid_argument (const string &__str)
         : logic_error (__str) { }
 
     // extension
-    _EXPLICIT invalid_argument (const char *__s = 0)
+    explicit invalid_argument (const char *__s = 0)
         : logic_error (__s) { }
 
     virtual ~invalid_argument () _THROWS (());
@@ -87,11 +87,11 @@
 // 19.1.4
 struct _RWSTD_EXPORT length_error: logic_error
 {
-    _EXPLICIT length_error (const string &__str)
+    explicit length_error (const string &__str)
         : logic_error (__str) { }
 
     // extension
-    _EXPLICIT length_error (const char *__s = 0)
+    explicit length_error (const char *__s = 0)
         : logic_error (__s) { }
 
     virtual ~length_error () _THROWS (());
@@ -101,11 +101,11 @@
 // 19.1.5
 struct _RWSTD_EXPORT out_of_range: logic_error
 {
-    _EXPLICIT out_of_range (const string &__str)
+    explicit out_of_range (const string &__str)
         : logic_error (__str) { }
 
     // extension
-    _EXPLICIT out_of_range (const char *__s = 0)
+    explicit out_of_range (const char *__s = 0)
         : logic_error (__s) { }
 
     virtual ~out_of_range () _THROWS (());
@@ -115,11 +115,11 @@
 // 19.1.6
 struct _RWSTD_EXPORT runtime_error: _RW::__rw_exception
 {
-    _EXPLICIT runtime_error (const string &__str)
+    explicit runtime_error (const string &__str)
         : _RW::__rw_exception (__str) { }
 
     // extension
-    _EXPLICIT runtime_error (const char *__s = 0)
+    explicit runtime_error (const char *__s = 0)
         : _RW::__rw_exception (__s) { }
 
     virtual ~runtime_error () _THROWS (());
@@ -129,11 +129,11 @@
 // 19.1.7
 struct _RWSTD_EXPORT range_error: runtime_error
 {
-    _EXPLICIT range_error (const string &__str)
+    explicit range_error (const string &__str)
         : runtime_error (__str) { }
 
     // extension
-    _EXPLICIT range_error (const char *__s = 0)
+    explicit range_error (const char *__s = 0)
         : runtime_error (__s) { }
 
     virtual ~range_error () _THROWS (());
@@ -143,11 +143,11 @@
 // 19.1.8
 struct _RWSTD_EXPORT overflow_error: runtime_error
 {
-    _EXPLICIT overflow_error (const string &__str)
+    explicit overflow_error (const string &__str)
         : runtime_error (__str) { }
 
     // extension
-    _EXPLICIT overflow_error (const char *__s = 0)
+    explicit overflow_error (const char *__s = 0)
         : runtime_error (__s) { }
 
     virtual ~overflow_error () _THROWS (());
@@ -157,11 +157,11 @@
 // 19.1.9
 struct _RWSTD_EXPORT underflow_error: runtime_error
 {
-    _EXPLICIT underflow_error (const string &__str)
+    explicit underflow_error (const string &__str)
         : runtime_error (__str) { }
 
     // extension
-    _EXPLICIT underflow_error (const char *__s = 0)
+    explicit underflow_error (const char *__s = 0)
         : runtime_error (__s) { }
 
     virtual ~underflow_error () _THROWS (());
diff --git a/include/streambuf b/include/streambuf
index d761225..51006a2 100644
--- a/include/streambuf
+++ b/include/streambuf
@@ -66,9 +66,9 @@
 public:
     typedef _CharT                          char_type;
     typedef _Traits                         traits_type;
-    typedef _TYPENAME traits_type::int_type int_type;
-    typedef _TYPENAME traits_type::pos_type pos_type;
-    typedef _TYPENAME traits_type::off_type off_type;
+    typedef typename traits_type::int_type int_type;
+    typedef typename traits_type::pos_type pos_type;
+    typedef typename traits_type::off_type off_type;
 
     virtual ~basic_streambuf () { }
 
@@ -427,7 +427,7 @@
 
 
 template<class _CharT, class _Traits>
-inline _TYPENAME basic_streambuf<_CharT, _Traits>::int_type
+inline typename basic_streambuf<_CharT, _Traits>::int_type
 basic_streambuf<_CharT, _Traits>::
 sbumpc ()
 {
@@ -444,7 +444,7 @@
 
 
 template<class _CharT, class _Traits>
-inline _TYPENAME basic_streambuf<_CharT, _Traits>::int_type
+inline typename basic_streambuf<_CharT, _Traits>::int_type
 basic_streambuf<_CharT, _Traits>::
 sputbackc (char_type __c)
 {
@@ -458,7 +458,7 @@
 
 
 template<class _CharT, class _Traits>
-inline _TYPENAME basic_streambuf<_CharT, _Traits>::int_type
+inline typename basic_streambuf<_CharT, _Traits>::int_type
 basic_streambuf<_CharT, _Traits>::
 sputc (char_type __ch)
 {
@@ -480,7 +480,7 @@
 
 
 template<class _CharT, class _Traits>
-inline _TYPENAME basic_streambuf<_CharT, _Traits>::int_type
+inline typename basic_streambuf<_CharT, _Traits>::int_type
 basic_streambuf<_CharT, _Traits>::
 sungetc ()
 {
diff --git a/include/streambuf.cc b/include/streambuf.cc
index b9761a2..356af26 100644
--- a/include/streambuf.cc
+++ b/include/streambuf.cc
@@ -49,7 +49,7 @@
 
 
 template <class _CharT, class _Traits>
-_TYPENAME basic_streambuf<_CharT, _Traits>::int_type
+typename basic_streambuf<_CharT, _Traits>::int_type
 basic_streambuf<_CharT, _Traits>::
 uflow ()
 {
diff --git a/include/string b/include/string
index f04731d..e713a18 100644
--- a/include/string
+++ b/include/string
@@ -47,14 +47,12 @@
 _RWSTD_NAMESPACE (std) { 
 
 
-#if    (   defined (_RWSTD_NO_MEMBER_TEMPLATES)   \
-        || defined (_RWSTD_NO_EXTERN_MEMBER_TEMPLATE))
+#if defined _RWSTD_NO_EXTERN_MEMBER_TEMPLATE
 #  define _RWSTD_NO_STRING_OUTLINED_MEMBER_TEMPLATES
 #endif   // _RWSTD_NO_STRING_MEMBER_TEMPLATES
 
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-#  ifdef _RWSTD_NO_STRING_OUTLINED_MEMBER_TEMPLATES
+#ifdef _RWSTD_NO_STRING_OUTLINED_MEMBER_TEMPLATES
 
 _EXPORT
 template <class _CharT, class _Traits, class _Alloc,
@@ -70,8 +68,7 @@
 __rw_replace_aux (std::basic_string<_CharT, _Traits, _Alloc>&, 
                   _StringIter, _StringIter, _InputIter, _InputIter);
 
-#  endif   // _RWSTD_NO_STRING_OUTLINED_MEMBER_TEMPLATES
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
+#endif   // _RWSTD_NO_STRING_OUTLINED_MEMBER_TEMPLATES
 
 
 _EXPORT
@@ -81,7 +78,7 @@
 public:
   
     typedef _Traits                               traits_type;
-    typedef _TYPENAME traits_type::char_type      value_type;
+    typedef typename traits_type::char_type      value_type;
     typedef _Allocator                            allocator_type;
 
     typedef _RW::__string_ref<value_type, traits_type, allocator_type>
@@ -92,12 +89,12 @@
     typedef  _RWSTD_REBIND(allocator_type, _C_string_ref_type)  
         _C_ref_alloc_type;
 
-    typedef _TYPENAME allocator_type::size_type       size_type;
-    typedef _TYPENAME allocator_type::difference_type difference_type;
-    typedef _TYPENAME allocator_type::reference       reference;
-    typedef _TYPENAME allocator_type::const_reference const_reference;
-    typedef _TYPENAME allocator_type::pointer         pointer;
-    typedef _TYPENAME allocator_type::const_pointer   const_pointer;
+    typedef typename allocator_type::size_type       size_type;
+    typedef typename allocator_type::difference_type difference_type;
+    typedef typename allocator_type::reference       reference;
+    typedef typename allocator_type::const_reference const_reference;
+    typedef typename allocator_type::pointer         pointer;
+    typedef typename allocator_type::const_pointer   const_pointer;
 
 #ifndef _RWSTD_NO_DEBUG_ITER
 
@@ -158,7 +155,7 @@
 #endif
 
     // 21.3.1, p2
-    _EXPLICIT basic_string (const allocator_type &__alloc = allocator_type ())
+    explicit basic_string (const allocator_type &__alloc = allocator_type ())
         : allocator_type (__alloc), _C_data (_C_nullref ()->data ()) { }
 
     // lwg issue #42
@@ -180,8 +177,6 @@
                   const allocator_type& = allocator_type ());
 
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
     // 21.3.1, p15
     template <class _InputIter>
     basic_string (_InputIter __first, _InputIter __last, 
@@ -191,8 +186,6 @@
                  __first, __last);
     }
 
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
-
     basic_string (const_pointer, const_pointer, const allocator_type&
                   _RWSTD_REDECLARED_DEFAULT (allocator_type ()));
 
@@ -310,8 +303,6 @@
         return append (__s, traits_type::length (__s));
     }
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
     template<class _InputIter>
     basic_string& append (_InputIter __first, _InputIter __last) {
         // resolves to append (size_type, value_type) if _InputIter
@@ -332,14 +323,6 @@
         return append (__n, __c);
     }
 
-#else   // if defined (_RWSTD_NO_MEMBER_TEMPLATES)
-
-    basic_string& append (const_pointer __first, const_pointer __last) {
-        return append (__first, __last - __first);
-    }
-
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
-
     basic_string& append (size_type, value_type);
 
     // lwg issue 7
@@ -360,8 +343,6 @@
     }
 
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
     template<class _InputIter>
     basic_string& assign (_InputIter __first, _InputIter __last) {
         // resolves to assign (size_type, value_type) if _InputIter
@@ -383,15 +364,6 @@
         return replace (size_type (), size (), __n, __c);
     }
 
-#else   // if defined (_RWSTD_NO_MEMBER_TEMPLATES)
-
-    basic_string& assign (const_pointer __first, const_pointer __last) {
-        replace (size_type (), size (), __first, __last - __first);
-        return *this;
-    }
-
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
-
     basic_string& assign (size_type __n, value_type __c) {
         return replace (size_type (), size (), __n, __c);
     }
@@ -415,8 +387,6 @@
         return insert (__inx, &__c, 1), begin () + __inx;
     }
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
     template<class _InputIter>
     void insert (iterator __p, _InputIter __first, _InputIter __last) {
         insert (__p, __first, __last, _RWSTD_DISPATCH (_InputIter));
@@ -461,18 +431,6 @@
 
 #  endif   // _RWSTD_NO_DEBUG_ITER
 
-#else   // if defined (_RWSTD_NO_MEMBER_TEMPLATES)
-
-    void insert (iterator __p, const_pointer __first, const_pointer __last) {
-        if (__first >= _C_data && __first <= _C_data + size ())
-            insert (_C_off (__p), basic_string (__first, __last));
-        else
-            replace (__p, __p, __first, __last);
-    }
-
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
-    
-
     void insert (iterator __it, size_type __n, value_type __c) {
         replace (_C_off (__it), size_type (), __n, __c);
     }
@@ -581,16 +539,14 @@
         return replace (_C_off (__first), _C_off (__first, __last), __n, __c);
     }
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
-#  ifndef _RWSTD_NO_STRING_OUTLINED_MEMBER_TEMPLATES
+#ifndef _RWSTD_NO_STRING_OUTLINED_MEMBER_TEMPLATES
 
     template<class _InputIter>
     basic_string&
     replace (iterator __first1, iterator __last1, 
              _InputIter __first2, _InputIter __last2, void*);
 
-#  else   // if defined (_RWSTD_NO_STRING_OUTLINED_MEMBER_TEMPLATES)
+#else   // if defined (_RWSTD_NO_STRING_OUTLINED_MEMBER_TEMPLATES)
 
     template<class _InputIter>
     basic_string&
@@ -599,7 +555,7 @@
         return __rw_replace (*this, __first1, __last1, __first2, __last2);
     }
 
-#  endif   // _RWSTD_NO_STRING_OUTLINED_MEMBER_TEMPLATES
+#endif   // _RWSTD_NO_STRING_OUTLINED_MEMBER_TEMPLATES
 
     basic_string&
     replace (iterator __first, iterator __last,
@@ -616,18 +572,6 @@
                         _RWSTD_DISPATCH (_InputIter));
     }
 
-#else   // if defined (_RWSTD_NO_MEMBER_TEMPLATES)
-
-    basic_string&
-    replace (iterator __first1, iterator __last1,
-             const_pointer __first2, const_pointer __last2) {
-        replace (_C_off (__first1), _C_off (__first1, __last1),
-                 __first2, size_type (__last2 - __first2));
-        return *this;
-    }
-
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
-
 
     // 21.3.5.7, p1
     size_type copy (pointer, size_type, size_type = 0) const;
@@ -928,7 +872,7 @@
 
 
 template <class _CharT, class _Traits, class _Alloc>
-inline _TYPENAME basic_string<_CharT, _Traits, _Alloc>::size_type
+inline typename basic_string<_CharT, _Traits, _Alloc>::size_type
 basic_string<_CharT, _Traits, _Alloc>::
 _C_grow (size_type __from, size_type __to) const
 {
@@ -958,7 +902,7 @@
 
 
 template <class _CharT, class _Traits , class _Allocator>
-inline _TYPENAME basic_string<_CharT, _Traits, _Allocator>::iterator
+inline typename basic_string<_CharT, _Traits, _Allocator>::iterator
 basic_string<_CharT, _Traits, _Allocator>::
 begin ()
 {
@@ -976,7 +920,7 @@
 
 
 template <class _CharT, class _Traits , class _Allocator>
-inline _TYPENAME basic_string<_CharT, _Traits, _Allocator>::size_type
+inline typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::
 max_size () const
 {
@@ -1005,7 +949,7 @@
 
 
 template <class _CharT, class _Traits , class _Allocator>
-inline _TYPENAME basic_string<_CharT, _Traits, _Allocator>::const_reference 
+inline typename basic_string<_CharT, _Traits, _Allocator>::const_reference 
 basic_string<_CharT, _Traits, _Allocator>::
 operator[] (size_type __pos) const
 {
@@ -1024,7 +968,7 @@
 
 
 template <class _CharT, class _Traits , class _Allocator>
-inline _TYPENAME basic_string<_CharT, _Traits, _Allocator>::reference
+inline typename basic_string<_CharT, _Traits, _Allocator>::reference
 basic_string<_CharT, _Traits, _Allocator>::
 operator[] (size_type __pos)
 {
@@ -1044,7 +988,7 @@
 
 
 template <class _CharT, class _Traits , class _Allocator>
-inline _TYPENAME basic_string<_CharT, _Traits, _Allocator>::const_reference
+inline typename basic_string<_CharT, _Traits, _Allocator>::const_reference
 basic_string<_CharT, _Traits, _Allocator>::
 at (size_type __pos) const
 {
@@ -1059,7 +1003,7 @@
 
 
 template <class _CharT, class _Traits , class _Allocator>
-inline _TYPENAME basic_string<_CharT, _Traits, _Allocator>::reference
+inline typename basic_string<_CharT, _Traits, _Allocator>::reference
 basic_string<_CharT, _Traits, _Allocator>::
 at (size_type __pos)
 {
@@ -1153,7 +1097,7 @@
 
 
 template <class _CharT, class _Traits , class _Allocator>
-inline _TYPENAME basic_string<_CharT, _Traits, _Allocator>::size_type
+inline typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::
 find (value_type __c, size_type __pos) const
 {
@@ -1333,7 +1277,7 @@
 operator== (const _CharT*                                    __lhs, 
             const basic_string<_CharT, _Traits, _Allocator>& __rhs)
 {
-    const _TYPENAME basic_string<_CharT, _Traits, _Allocator>::size_type
+    const typename basic_string<_CharT, _Traits, _Allocator>::size_type
         __n = _Traits::length (__lhs);
 
     // avoid using basic_string<>::compare() for efficiency
@@ -1528,7 +1472,7 @@
 
 #  ifndef _RWSTD_NO_NONDEDUCED_CONTEXT
 #    define _RWSTD_STRING_SIZE_TYPE \
-            _TYPENAME _STD::basic_string<_CharT, _Traits, _Allocator>::size_type
+            typename _STD::basic_string<_CharT, _Traits, _Allocator>::size_type
 #  else
 #    define _RWSTD_STRING_SIZE_TYPE _RWSTD_SIZE_T
 #  endif   // _RWSTD_NO_NONDEDUCED_CONTEXT
diff --git a/include/string.cc b/include/string.cc
index 5cf543a..c6325fb 100644
--- a/include/string.cc
+++ b/include/string.cc
@@ -47,7 +47,7 @@
 #    ifndef _RWSTD_NO_STRING_NPOS_TYPE
 
 template <class _CharT, class _Traits, class _Allocator>
-const _TYPENAME basic_string<_CharT, _Traits, _Allocator>::size_type
+const typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::
 npos /* = SIZE_MAX */;
 
@@ -74,7 +74,7 @@
 
 
 template <class _CharT, class _Traits, class _Allocator>
-_TYPENAME basic_string<_CharT, _Traits, _Allocator>::_C_string_ref_type*
+typename basic_string<_CharT, _Traits, _Allocator>::_C_string_ref_type*
 basic_string<_CharT, _Traits, _Allocator>::
 _C_get_rep (size_type __cap, size_type __len)
 {
@@ -461,9 +461,7 @@
 }
 
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
-#  ifdef _RWSTD_NO_STRING_OUTLINED_MEMBER_TEMPLATES
+#ifdef _RWSTD_NO_STRING_OUTLINED_MEMBER_TEMPLATES
 
 _EXPORT
 template <class _CharT, class _Traits, class _Alloc,
@@ -474,9 +472,9 @@
               _InputIter __first2, _InputIter __last2) {
 
     typedef _Traits                               traits_type;
-    typedef _TYPENAME traits_type::char_type      value_type;
+    typedef typename traits_type::char_type      value_type;
     typedef _Alloc                                allocator_type;
-    typedef _TYPENAME allocator_type::size_type   size_type;
+    typedef typename allocator_type::size_type   size_type;
 
     typedef _STD::basic_string<_CharT, _Traits, _Alloc> _C_string_type;
 
@@ -484,7 +482,7 @@
      _C_string_ref_type;
 
 
-#  else   // !defined (_RWSTD_NO_STRING_OUTLINED_MEMBER_TEMPLATES)
+#else   // !defined (_RWSTD_NO_STRING_OUTLINED_MEMBER_TEMPLATES)
 
 template<class _CharT, class _Traits, class _Allocator>
 template<class _InputIter>
@@ -497,7 +495,7 @@
 
     basic_string &__s = *this;
 
-#  endif   // _RWSTD_NO_STRING_OUTLINED_MEMBER_TEMPLATES
+#endif   // _RWSTD_NO_STRING_OUTLINED_MEMBER_TEMPLATES
 
     _RWSTD_ASSERT_RANGE (__first1,
                          __s._C_make_iter (__s._C_data + __s.size ()));
@@ -519,7 +517,7 @@
         return __s.__replace_aux (__first1, __last1, __first2, __last2);
 
     _C_string_type __s3;
-    _TYPENAME _C_string_type::iterator __first3 = __s3.begin ();
+    typename _C_string_type::iterator __first3 = __s3.begin ();
     
     for ( ; !(__first2 == __last2); ++__first2, ++__first3) {
 
@@ -561,7 +559,7 @@
 // Avoids the possibility of multiple allocations
 // We still have to copy characters over one at a time.
 
-#  ifdef _RWSTD_NO_STRING_OUTLINED_MEMBER_TEMPLATES
+#ifdef _RWSTD_NO_STRING_OUTLINED_MEMBER_TEMPLATES
 
 _EXPORT
 template <class _CharT, class _Traits, class _Alloc,
@@ -572,18 +570,18 @@
                   _InputIter __first2, _InputIter __last2)
 {
     typedef _Traits                                   traits_type;
-    typedef _TYPENAME traits_type::char_type          value_type;
+    typedef typename traits_type::char_type          value_type;
     typedef _Alloc                                    allocator_type;
-    typedef _TYPENAME allocator_type::size_type       size_type;
-    typedef _TYPENAME allocator_type::difference_type difference_type;
-    typedef _TYPENAME allocator_type::pointer         pointer;
-    typedef _TYPENAME allocator_type::const_pointer   const_pointer;
-    typedef _TYPENAME allocator_type::const_reference const_reference;
+    typedef typename allocator_type::size_type       size_type;
+    typedef typename allocator_type::difference_type difference_type;
+    typedef typename allocator_type::pointer         pointer;
+    typedef typename allocator_type::const_pointer   const_pointer;
+    typedef typename allocator_type::const_reference const_reference;
 
     typedef _RW::__string_ref<value_type, traits_type, allocator_type>
     _C_string_ref_type;
 
-#  else   // if !defined (_RWSTD_NO_STRING_OUTLINED_MEMBER_TEMPLATES)
+#else   // if !defined (_RWSTD_NO_STRING_OUTLINED_MEMBER_TEMPLATES)
 
 template<class _CharT, class _Traits, class _Allocator>
 template<class _InputIter>
@@ -594,7 +592,7 @@
 {
     basic_string &__s = *this;
 
-#  endif  // _RWSTD_NO_STRING_OUTLINED_MEMBER_TEMPLATES
+#endif  // _RWSTD_NO_STRING_OUTLINED_MEMBER_TEMPLATES
 
     _RWSTD_ASSERT_RANGE (__first1, __s._C_make_iter (__s._C_data 
                                                      + __s.size ()));
@@ -667,11 +665,9 @@
     return __s;
 }
 
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
-
 
 template <class _CharT, class _Traits, class _Allocator>
-_TYPENAME basic_string<_CharT, _Traits, _Allocator>::size_type
+typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::
 copy (pointer __s, size_type __n, size_type __pos) const
 {
@@ -690,7 +686,7 @@
 
 
 template <class _CharT, class _Traits, class _Allocator>
-_TYPENAME basic_string<_CharT, _Traits, _Allocator>::size_type
+typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::
 find (const_pointer __seq, size_type __off, size_type __len) const
 {
@@ -749,7 +745,7 @@
 
 
 template <class _CharT, class _Traits, class _Allocator>
-_TYPENAME basic_string<_CharT, _Traits, _Allocator>::size_type
+typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::
 rfind (const_pointer __s, size_type __pos, size_type __n) const
 {
@@ -771,7 +767,7 @@
 
 
 template <class _CharT, class _Traits, class _Allocator>
-_TYPENAME basic_string<_CharT, _Traits, _Allocator>::size_type
+typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::
 find_first_of (const_pointer __s, size_type __pos, size_type __n) const
 {
@@ -788,7 +784,7 @@
 
 
 template <class _CharT, class _Traits, class _Allocator>
-_TYPENAME basic_string<_CharT, _Traits, _Allocator>::size_type
+typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::
 find_last_of (const_pointer __s, size_type __pos, size_type __n) const
 {
@@ -809,7 +805,7 @@
 
 
 template <class _CharT, class _Traits, class _Allocator>
-_TYPENAME basic_string<_CharT, _Traits, _Allocator>::size_type
+typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::
 find_first_not_of (const_pointer __s, size_type __pos, size_type __n) const
 {
@@ -832,7 +828,7 @@
 
 
 template <class _CharT, class _Traits, class _Allocator>
-_TYPENAME basic_string<_CharT, _Traits, _Allocator>::size_type
+typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::
 find_last_not_of (const_pointer __s, size_type __pos, size_type __n) const
 {
diff --git a/include/strstream b/include/strstream
index 95222b7..471b32f 100644
--- a/include/strstream
+++ b/include/strstream
@@ -55,7 +55,7 @@
 public:
 
     // D.7.1.1, p1
-    _EXPLICIT
+    explicit
     strstreambuf (streamsize __alsize = 0)
         : _Base () {
         _C_init (__alsize, 0, 0, 0, 0, 0, _C_dynamic);
@@ -176,11 +176,11 @@
     }
 
     // D.7.2.1, p1, and p2
-    _EXPLICIT
+    explicit
     istrstream (const char_type *__s, streamsize __n = 0)
         : _Base (rdbuf ()), _C_sb (__s, __n) { }
 
-    _EXPLICIT
+    explicit
     istrstream (char_type *__s, streamsize __n = 0)
         : _Base (rdbuf ()), _C_sb (__s, __n) { }
 
diff --git a/include/tuple b/include/tuple
index 305ebf4..691048a 100644
--- a/include/tuple
+++ b/include/tuple
@@ -1,9 +1,9 @@
 // -*- C++ -*-
 /***************************************************************************
  *
- * tuple - fixed-size collection of values with variable, heterogenous types
+ * tuple - fixed-size collections with variable, heterogenous types
  *
- * $Id$
+ * $Id: tuple 677458 2008-07-16 22:49:27Z elemings $
  *
  ***************************************************************************
  *
@@ -23,8 +23,8 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 2008 Rogue Wave Software.
- * 
+ * Copyright 2008 Rogue Wave Software, Inc.
+ *
  **************************************************************************/
 
 #ifndef _RWSTD_TUPLE_INCLUDED
@@ -36,82 +36,270 @@
 #    error _RWSTD_NO_EXT_CXX_0X defined and C++0x header included
 #  endif   // defined _RWSTD_NO_EXT_CXX_0X
 
-#  include <type_traits>
-
-#  include <rw/_ref_wrap.h>
+#  include <rw/_forward.h>          // for _RWSTD_FORWARD, _RWSTD_MOVE
+#  include <rw/_meta_cv.h>          // for _RWSTD_ADD_CONST
+#  include <rw/_meta_help.h>        // for __rw_integral_constant
+#  include <rw/_meta_ref.h>         // for _RWSTD_ADD_LVALUE_REFERENCE
+#  include <rw/_pair.h>             // for std::pair
 
 #  include <rw/_tuple.h>
-#  include <rw/_tuple_traits.h>
 
-
-_RWSTD_NAMESPACE (__rw) {
-
-struct __rw_ignore { /* empty */ };
-
-template <class _Type>
-struct __rw_deduce_reference
-{
-    typedef _Type type;
-};
-
-template <class _Type>
-struct __rw_deduce_reference< __rw_ref_wrap<_Type> >
-{
-    typedef _Type& type;
-};
-
-template <class _Type>
-struct __rw_deduce_reference< const __rw_ref_wrap<_Type> >
-{
-    typedef _Type& type;
-};
-
-/**
- * @internal
- * Transform a tuple element type into a suitable make_tuple() return
- * type.
- * @tparam _Type A tuple element type.
- */
-template <class _Type>
-class __rw_make_tuple
-{
-    typedef _TYPENAME _RWSTD_DECAY(_Type) _Decay;
-    typedef _TYPENAME __rw_deduce_reference<_Decay>::type type;
-};
-
-}   // namespace __rw
+#  if !defined _RWSTD_NO_VARIADIC_TEMPLATES
 
 
 _RWSTD_NAMESPACE (std) {
 
 
+// 20.3.1, class template tuple:
+
+template <class... _TypesT>
+class tuple;
+
+_RWSTD_SPECIALIZED_CLASS
+class tuple<>
+{
+    // empty
+};
+
+template <class... _TypesT>
+class tuple
+    : public _RW::__rw_tuple<_TypesT...>
+{
+    typedef _RW::__rw_tuple<_TypesT...> _Base;
+
+#    undef _BaseU
+#    define _BaseU  _RW::__rw_tuple<_TypesU...>
+
+public:
+
+    tuple ()
+        : _Base () { /* empty */ }
+
+    // employ _RWSTD_STATIC_CAST to ensure compiler binds to correct
+    // base class ctors and operators
+
+    tuple (const tuple& __tuple)
+        : _Base (_RWSTD_STATIC_CAST (const _Base&, __tuple)) { /* empty */ }
+
+    tuple& operator= (const tuple& __tuple) {
+        _Base::operator= (_RWSTD_STATIC_CAST (const _Base&, __tuple));
+        return *this;
+    }
+
+    explicit
+    tuple (const _TypesT&... __values)
+        : _Base (__values...) { /* empty */ }
+
+    template <class... _TypesU>
+    tuple (const tuple<_TypesU...>& __tuple)
+        : _Base (_RWSTD_STATIC_CAST (const _BaseU&, __tuple)) { /* empty */ }
+
+    template <class... _TypesU>
+    tuple& operator= (const tuple<_TypesU...>& __tuple) {
+        _Base::operator= (_RWSTD_STATIC_CAST (const _BaseU&, __tuple));
+        return *this;
+    }
+
+#    if !defined _RWSTD_NO_RVALUE_REFERENCES
+
+    tuple (tuple&& __tuple)
+        : _Base (_RWSTD_FORWARD (_Base, __tuple)) { /* empty */ }
+
+    tuple& operator= (tuple&& __tuple) {
+        _Base::operator= (_RWSTD_FORWARD (_Base, __tuple));
+        return *this;
+    }
+
+    template <class... _TypesU>
+    explicit tuple (_TypesU&&... __values)
+        : _Base (_RWSTD_FORWARD (_TypesU, __values)...) { /* empty */ }
+
+    template <class... _TypesU>
+    tuple (tuple<_TypesU...>&& __tuple)
+        : _Base (_RWSTD_FORWARD (_BaseU, __tuple)) { /* empty */ }
+
+    template <class... _TypesU>
+    tuple& operator= (tuple<_TypesU...>&& __tuple) {
+        _Base::operator= (_RWSTD_FORWARD (_BaseU, __tuple));
+        return *this;
+    }
+
+    // allocator-extended constructors:
+
+    template <class _Alloc, class... _TypesU>
+    tuple (allocator_arg_t, const _Alloc& __alloc,
+           const _TypesU&&... __values);
+
+    template <class _Alloc>
+    tuple (allocator_arg_t, const _Alloc& __alloc,
+           tuple&& __tuple);
+
+    template <class _Alloc, class... _TypesU>
+    tuple (allocator_arg_t, const _Alloc& __alloc,
+           tuple<_TypesU...>&& __tuple);
+
+#    endif   // !defined _RWSTD_NO_RVALUE_REFERENCES
+
+#    undef _BaseU
+
+    template <class _Alloc>
+    tuple (allocator_arg_t, const _Alloc& __alloc);
+
+    template <class _Alloc>
+    tuple (allocator_arg_t, const _Alloc& __alloc,
+           const _TypesT&... __values);
+
+    template <class _Alloc>
+    tuple (allocator_arg_t, const _Alloc& __alloc,
+           const tuple& __tuple);
+
+    template <class _Alloc, class... _TypesU>
+    tuple (allocator_arg_t, const _Alloc& __alloc,
+           const tuple<_TypesU...>& __tuple);
+
+};
+
+
+template <class _TypeT1, class _TypeT2>
+class tuple<_TypeT1, _TypeT2>
+    : public _RW::__rw_tuple<_TypeT1, _TypeT2>
+{
+    typedef _RW::__rw_tuple<_TypeT1, _TypeT2>   _Base;
+
+#    undef _BaseU
+#    define _BaseU  _RW::__rw_tuple<_TypeU1, _TypeU2>
+
+public:
+
+    // 20.3.1.2, construction:
+
+    tuple ()
+        : _Base () { /* empty */ }
+
+    tuple (const tuple& __tuple)
+        : _Base (_RWSTD_STATIC_CAST (const _Base&, __tuple)) { /* empty */ }
+
+    tuple& operator= (const tuple& __tuple) {
+        _Base::operator= (_RWSTD_STATIC_CAST (const _Base&, __tuple));
+        return *this;
+    }
+
+    tuple (const _TypeT1& __x, const _TypeT2& __y)
+        : _Base (__x, __y) { /* empty */ }
+
+    template <class _TypeU1, class _TypeU2>
+    tuple (const tuple<_TypeU1, _TypeU2>& __tuple)
+        : _Base (_RWSTD_STATIC_CAST (const _BaseU&, __tuple)) { /* empty */ }
+
+    template <class _TypeU1, class _TypeU2>
+    tuple& operator= (const tuple<_TypeU1, _TypeU2>& __tuple) {
+        _Base::operator= (_RWSTD_STATIC_CAST (const _BaseU&, __tuple));
+        return *this;
+    }
+
+    template <class _TypeU1, class _TypeU2>
+    tuple (const pair<_TypeU1, _TypeU2>& __pair)
+        : _Base (__pair.first, __pair.second) { /* empty */ }
+
+    template <class _TypeU1, class _TypeU2>
+    tuple& operator= (const pair<_TypeU1, _TypeU2>& __pair) {
+        _Base::operator= (__pair.first, __pair.second);
+        return *this;
+    }
+
+#    if !defined _RWSTD_NO_RVALUE_REFERENCES
+
+    template <class _TypeU1, class _TypeU2>
+    tuple (_TypeU1&& __x, _TypeU2&& __y)
+        : _Base (_RWSTD_MOVE (__x), _RWSTD_MOVE (__y)) { /* empty */ }
+
+    tuple (tuple&& __tuple)
+        : _Base (_RWSTD_FORWARD (_Base, __tuple)) { /* empty */ }
+
+    tuple& operator= (tuple&& __tuple) {
+        _Base::operator= (_RWSTD_FORWARD (_Base, __tuple));
+        return *this;
+    }
+
+    template <class _TypeU1, class _TypeU2>
+    tuple (tuple<_TypeU1, _TypeU2>&& __tuple)
+        : _Base (_RWSTD_FORWARD (_BaseU, __tuple))
+    { /* empty */ }
+
+    template <class _TypeU1, class _TypeU2>
+    tuple& operator= (tuple<_TypeU1, _TypeU2>&& __tuple) {
+        _Base::operator= (_RWSTD_FORWARD (_BaseU, __tuple));
+        return *this;
+    }
+
+    template <class _TypeU1, class _TypeU2>
+    tuple (pair<_TypeU1, _TypeU2>&& __pair)
+        : _Base (_RWSTD_MOVE (__pair.first),
+                 _RWSTD_MOVE ( __pair.second)) { /* empty */ }
+
+    template <class _TypeU1, class _TypeU2>
+    tuple& operator= (pair<_TypeU1, _TypeU2>&& __pair) {
+        _Base::operator= (__pair.first, __pair.second);
+        return *this;
+    }
+
+    // allocator-extended constructors:
+
+    template <class _Alloc, class _TypeU1, class _TypeU2>
+    tuple (allocator_arg_t, const _Alloc& __alloc,
+           pair<_TypeU1, _TypeU2>&& __pair);
+
+#    endif   // !defined _RWSTD_NO_RVALUE_REFERENCES
+
+#    undef _BaseU
+
+    template <class _Alloc, class _TypeU1, class _TypeU2>
+    tuple (allocator_arg_t, const _Alloc& __alloc,
+           const pair<_TypeU1, _TypeU2>& __pair);
+
+};
+
+
+// 20.3.1.1, tuple traits:
+
+template <class _Type, class _Alloc>
+struct uses_allocator;
+
+template <class... _TypesT, class _Alloc>
+struct uses_allocator<tuple<_TypesT...>, _Alloc>
+    : _RW::__rw_true_type
+{
+    // empty
+};
+
+
+template <class _Type>
+struct constructible_with_allocator_prefix;
+
+template <class... _TypesT>
+struct constructible_with_allocator_prefix<tuple<_TypesT...> >
+    : _RW::__rw_true_type
+{
+    // empty
+};
+
+
 // 20.3.3, tuple creation functions:
 
 const _RW::__rw_ignore ignore = _RW::__rw_ignore ();
 
-#  if !defined _RWSTD_NO_VARIADIC_TEMPLATES
 
 #    if !defined _RWSTD_NO_RVALUE_REFERENCES
 
-/**
- * @function make_tuple
- *
- * Create a new tuple from a list of element values.  This function
- * constructs a new tuple from the corresponding element values by
- * utilizing move semantics.
- *
- * @tparam _Types The list of elements types in the tuple.
- * @param __values A corresponding list of element values.
- * @return A tuple object containing the given element values.
- */
-template <class... _Types>
-tuple<_TYPENAME _RW::__rw_make_tuple<_Types>::type...>
-make_tuple (_Types&&... __values)
+template <class... _TypesT>
+inline tuple<typename _RW::__rw_make_tuple<_TypesT>::_C_type...>
+make_tuple (_TypesT&&... __values)
 {
-    typedef tuple<_TYPENAME _RW::__rw_make_tuple<_Types>::type...> _Tuple;
-    return _Tuple (std::forward<_Types> (__values)...);
+    typedef tuple<typename _RW::__rw_make_tuple<_TypesT>::_C_type...> _Tuple;
+    return _Tuple (_RWSTD_FORWARD (_TypesT, __values)...);
 }
 
+
 template <class... _TypesT, class... _TypesU>
 tuple<_TypesT..., _TypesU...>
 tuple_cat (tuple<_TypesT...>&& __x,
@@ -129,86 +317,60 @@
 
 #    endif   // !defined _RWSTD_NO_RVALUE_REFERENCES
 
-template <class... _Types>
-tuple<_Types&...> tie (_Types&...);
-
 template <class... _TypesT, class... _TypesU>
 tuple<_TypesT..., _TypesU...>
 tuple_cat (const tuple<_TypesT...>& __x,
            const tuple<_TypesU...>& __y);
 
 
+template <class... _TypesT>
+inline tuple<_TypesT&...>
+tie (_TypesT&... __values)
+{
+    return tuple<_TypesT&...> (__values...);
+}
+
+
 // 20.3.1.4, tuple helper classes:
 
-/**
- * @class tuple_size
- *
- * Determine number of element types in tuple.  This compile-time
- * integral constant wrapper determines the number of element types in
- * a tuple.  The class template is ill-formed for any non-tuple typle.
- *
- * @tparam Types List of element types in tuple.
- */
-
-template <class Types>
+template <class _TypesT>
 class tuple_size;
 
-template <class... _Types>
-class tuple_size< tuple<_Types...> >
+template <class... _TypesT>
+class tuple_size< tuple<_TypesT...> >
     : public _RW::__rw_integral_constant< _RWSTD_SIZE_T,
-                                          sizeof... (_Types) >
+                                          sizeof... (_TypesT) >
 {
     // empty
 };
 
 
-/**
- * @class tuple_element
- *
- * Determine the Nth element type of a tuple.  Instances of this class
- * class template provide a type member that identifies the Nth element
- * type of a tuple \c T where 0 <= N <
- * <code>tuple_size&lt;T&gt;::value</code>.  If N is not in this range
- * or for any other arbitrary type, the program is ill-formed.
- *
- * @tparam Index An integer constant indicating the Nth element type.
- * @tparam Types List of element types in the tuple.
- */
-
-template <int Index, class... Types>
+template <_RWSTD_SIZE_T _Index, class... _TypesT>
 struct tuple_element;
 
 template <class _Head, class... _Tail>
 struct tuple_element<0, tuple<_Head, _Tail...> >
 {
-    /** The Nth element type of the tuple. */
     typedef _Head type;
 
+//internal:
 
-    typedef tuple<_Head, _Tail...>          _Tuple;
+    typedef _RW::__rw_tuple<_Head, _Tail...>    _Tuple;
 
-#  define _RWSTD_ADD_CONST(T) \
-          _TYPENAME _RW::__rw_add_const<T>::type
-#  define _RWSTD_ADD_LVAL_REF(T) \
-          _TYPENAME _RW::__rw_add_lvalue_reference<T>::type
-
-    typedef _RWSTD_ADD_CONST (_Head)        _Const;
-    typedef _RWSTD_ADD_LVAL_REF (_Head)     _Ref;
-    typedef _RWSTD_ADD_LVAL_REF (_Const)    _ConstRef;
-
-#  undef _RWSTD_ADD_CONST
-#  undef _RWSTD_ADD_LVAL_REF
+    typedef typename _RWSTD_ADD_LVALUE_REFERENCE (_Head)       _Ref;
+    typedef typename _RWSTD_ADD_CONST (_Head)                  _ConstHead;
+    typedef typename _RWSTD_ADD_LVALUE_REFERENCE (_ConstHead)  _ConstRef;
 
     static _Ref
-    __get (_Tuple& __tuple) { return __tuple.__get (); }
+    _C_get (_Tuple& __tuple) { return __tuple._C_head (); }
 
     static _ConstRef
-    __get (const _Tuple& __tuple) { return __tuple.__get (); }
+    _C_get (const _Tuple& __tuple) { return __tuple._C_head (); }
 };
 
-template <int _Index, class _Head, class... _Tail>
+template <_RWSTD_SIZE_T _Index, class _Head, class... _Tail>
 struct tuple_element<_Index, tuple<_Head, _Tail...> >
-    : tuple_element<_Index - 1, tuple<_Tail...> >
+    : public tuple_element<_Index - 1, tuple<_Tail...> >
 {
     // empty
 };
@@ -216,99 +378,95 @@
 
 // 20.3.1.5, element access:
 
-/**
- * @function get
- *
- * Access Nth element value of a tuple.  This function returns a
- * cv-qualified value reference to the Nth element in a tuple \c T
- * where 0 <= N < <code>tuple_size&lt;T&gt;::value</code>.  If N is
- * not in this range, the program is ill-formed.
- *
- * @tparam Index An integer constant indicating the Nth element type.
- * @tparam Types List of element types in the tuple.
- * @param tuple A tuple value.
- * @return CV-qualified reference to the Nth element value of tuple.
- */
-
-template <int _Index, class _Head, class... _Tail>
-_TYPENAME tuple_element<_Index, tuple<_Head, _Tail...> >::_Ref
+template <_RWSTD_SIZE_T _Index, class _Head, class... _Tail>
+inline typename tuple_element<_Index, tuple<_Head, _Tail...> >::_Ref
 get (tuple<_Head, _Tail...>& __tuple)
 {
     typedef tuple_element<_Index, tuple<_Head, _Tail...> > _Tuple;
-    return _Tuple::__get (__tuple);
+    return _Tuple::_C_get (__tuple);
 }
 
-template <int _Index, class _Head, class... _Tail>
-_TYPENAME tuple_element<_Index, tuple<_Head, _Tail...> >::_ConstRef
+template <_RWSTD_SIZE_T _Index, class _Head, class... _Tail>
+inline typename tuple_element<_Index, tuple<_Head, _Tail...> >::_ConstRef
 get (const tuple<_Head, _Tail...>& __tuple)
 {
     typedef tuple_element<_Index, tuple<_Head, _Tail...> > _Tuple;
-    return _Tuple::__get (__tuple);
+    return _Tuple::_C_get (__tuple);
 }
 
 
 // 20.3.1.6, relational operators:
 
 template <class... _TypesT, class... _TypesU>
-bool operator== (const tuple<_TypesT...>& __x,
-                 const tuple<_TypesU...>& __y);
+inline bool
+operator== (const tuple<_TypesT...>& __x,
+            const tuple<_TypesU...>& __y)
+{
+    return _RWSTD_STATIC_CAST (const _RW::__rw_tuple<_TypesT...>&, __x)
+           == _RWSTD_STATIC_CAST (const _RW::__rw_tuple<_TypesU...>&, __y);
+}
+
+_RWSTD_SPECIALIZED_FUNCTION
+inline bool
+operator== (const tuple<>& /*__x*/,
+            const tuple<>& /*__y*/)
+{
+    return true;
+}
 
 template <class... _TypesT, class... _TypesU>
-bool operator< (const tuple<_TypesT...>& __x,
-                const tuple<_TypesU...>& __y);
+inline bool
+operator< (const tuple<_TypesT...>& __x,
+           const tuple<_TypesU...>& __y)
+{
+    return _RWSTD_STATIC_CAST (const _RW::__rw_tuple<_TypesT...>&, __x)
+           < _RWSTD_STATIC_CAST (const _RW::__rw_tuple<_TypesU...>&, __y);
+}
 
-/**
- * @param __x Tuple value on LHS of operator.
- * @param __y Tuple value on RHS of operator.
- * @return !(__x == __y)
- */
+_RWSTD_SPECIALIZED_FUNCTION
+inline bool
+operator< (const tuple<>& /*__x*/,
+           const tuple<>& /*__y*/)
+{
+    return false;
+}
+
 template <class... _TypesT, class... _TypesU>
-bool operator!= (const tuple<_TypesT...>& __x,
-                 const tuple<_TypesU...>& __y)
+inline bool
+operator!= (const tuple<_TypesT...>& __x,
+            const tuple<_TypesU...>& __y)
 {
     return !(__x == __y);
 }
 
-/**
- * @param __x Tuple value on LHS of operator.
- * @param __y Tuple value on RHS of operator.
- * @return __y < __x
- */
 template <class... _TypesT, class... _TypesU>
-bool operator> (const tuple<_TypesT...>& __x,
-                const tuple<_TypesU...>& __y)
+inline bool
+operator> (const tuple<_TypesT...>& __x,
+           const tuple<_TypesU...>& __y)
 {
     return __y < __x;
 }
 
-
-/**
- * @param __x Tuple value on LHS of operator.
- * @param __y Tuple value on RHS of operator.
- * @return !(__y < __x)
- */
 template <class... _TypesT, class... _TypesU>
-bool operator<= (const tuple<_TypesT...>& __x,
-                 const tuple<_TypesU...>& __y)
+inline bool
+operator<= (const tuple<_TypesT...>& __x,
+            const tuple<_TypesU...>& __y)
 {
     return !(__y < __x);
 }
 
-/**
- * @param __x Tuple value on LHS of operator.
- * @param __y Tuple value on RHS of operator.
- * @return !(__x < __y)
- */
 template <class... _TypesT, class... _TypesU>
-bool operator>= (const tuple<_TypesT...>& __x,
-                 const tuple<_TypesU...>& __y)
+inline bool
+operator>= (const tuple<_TypesT...>& __x,
+            const tuple<_TypesU...>& __y)
 {
     return !(__x < __y);
 }
 
 
-#  endif   // !defined _RWSTD_NO_VARIADIC_TEMPLATES
-
 }   // namespace std
 
+
+#  endif   // !defined _RWSTD_NO_VARIADIC_TEMPLATES
+
 #endif   // _RWSTD_TUPLE_INCLUDED
diff --git a/include/type_traits b/include/type_traits
index 92b7e3f..830806f 100644
--- a/include/type_traits
+++ b/include/type_traits
@@ -50,171 +50,11 @@
 
 _RWSTD_NAMESPACE (std) {
 
-/**
- * @defgroup meta_help Helper classes [meta.help]
- */
-
-/**
- * @defgroup meta_unary Unary Type Traits [meta.unary]
- *
- * A UnaryTypeTrait describes a property of a type. It shall be a
- * class template that takes one template type argument and, optionally,
- * additional arguments that help define the property being described.
- * It shall be DefaultConstructible, CopyConstructible, and publicly
- * derived, directly or indirectly, from a specialization of the template
- * integral_constant, with the arguments to the template integral_constant
- * determined by the requirements for the particular property being
- * described.
- *
- * This sub-clause contains templates that may be used to query the
- * properties of a type at compile time.
- * 
- * Each of these templates shall be a UnaryTypeTrait, publicly derived
- * directly or indirectly from true_type if the corresponding condition
- * is true, otherwise from false_type.
- */
-
-/**
- * @defgroup meta_unary_cat Primary Type Categories [meta.unary.cat]
- * @ingroup meta_unary
- *
- * These type categories correspond to the descriptions given in section
- * [basic.types] of the C++ standard.
- *
- * For any given type T, the result of applying one of these templates
- * to T and to cv-qualified T shall yield the same result.
- *
- * @note For any given type T, exactly one of the primary type
- * categories has a \c value member that evaluates to true.
- */
-
-/**
- * @defgroup meta_unary_comp Composite Type Categories [meta.unary.comp]
- * @ingroup meta_unary
- *
- * These templates provide convenient compositions of the primary type
- * categories.
- *
- * For any given type T, the result of applying one of these templates
- * to T, and to cv-qualified T shall yield the same result.
- */
-
-/**
- * @defgroup meta_unary_prop Type Properties [meta.unary.prop]
- * @ingroup meta_unary
- *
- * These templates provide access to some of the more important properties
- * of types.
- *
- * It is unspecified whether the library defines any full or partial
- * specialisations of any of these templates. A program may specialise
- * any of these templates on a user-defined type, provided the semantics
- * of the specialisation match those given for the template in its
- * description.
- *
- * For all of the class templates X declared in this clause, instantiating
- * that template with a template-argument that is a class template
- * specialization may result in the implicit instantiation of the template
- * argument if and only if the semantics of X require that the argument
- * must be a complete type.
- */
-
-/**
- * @defgroup meta_rel Relationships between types [meta.rel]
- *
- * This sub-clause contains templates that may be used to query
- * relationships between types at compile time.
- * 
- * Each of these templates shall be a BinaryTypeTrait, publicly
- * derived directly or indirectly from true_type if the
- * corresponding condition is true, otherwise from false_type.
- */
-
-/**
- * @defgroup meta_trans Transformations between types [meta.trans]
- *
- * A TransformationTrait modifies a property of a type. It shall
- * be a class template that takes one template type argument and,
- * optionally, additional arguments that help define the modification.
- * It shall define a nested type named type, which shall be a synonym
- * for the modified type.
- *
- * This sub-clause contains templates that may be used to transform
- * one type to another following some predefined rule.
- *
- * Each of the templates in this subclause shall be a
- * TransformationTrait.
- */
- 
-/**
- * @defgroup meta_trans_cv Const-volatile modifications [meta.trans.cv]
- * @ingroup meta_trans
- *
- * This sub-clause contains templates used to add and remove const
- * and volatile qualifiers from types.
- */
-
-/**
- * @defgroup meta_trans_ref Reference modification [meta.trans.ref]
- * @ingroup meta_trans
- *
- * This sub-clause contains templates used to add and remove reference
- * semantics from types.
- */
-
-/**
- * @defgroup meta_trans_sign Sign modifications [meta.trans.sign]
- * @ingroup meta_trans
- *
- * This sub-clause contains templates used to transform from signed
- * to unsigned representation or vice-versa.
- */
-
-/**
- * @defgroup meta_trans_arr Array modifications [meta.trans.arr]
- * @ingroup meta_trans
- *
- * This sub-clause contains templates used to manage array types.
- */
-
-/**
- * @defgroup meta_trans_pointer Pointer modifications [meta.trans.ptr]
- * @ingroup meta_trans
- *
- * This sub-clause contains templates used to manage pointer types.
- */
-
-/**
- * @defgroup meta_trans_other Other transformations [meta.trans.other]
- * @ingroup meta_trans
- */
-
-/**
- * @ingroup meta_help
- *
- * The class template integral_constant and its associated typedefs
- * true_type and false_type are used as base classes to define the
- * interface for various type traits.
- *
- * @tparam _TypeT The type of the integral constant value.
- * @tparam _Value The value of the integral constant.
- */
 template <class _TypeT, _TypeT _Value>
 struct integral_constant
 {
-    /**
-     * Describes the type of this integral_constant.
-     */
     typedef 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;
 };
 
@@ -225,1027 +65,388 @@
 
 #endif    // _RWSTD_NO_STATIC_CONST_MEMBER_DEFINITION
 
-/**
- * @ingroup meta_help
- *
- * Convenience typedef that are intended to be used as a base class
- * for boolean type traits that are true.
- */
 typedef integral_constant<bool, true>  true_type;
-
-/**
- * @ingroup meta_help
- *
- * Convenience typedef that are intended to be used as a base class
- * for boolean type traits that are false.
- */
 typedef integral_constant<bool, false> false_type;
 
-/**
- * @ingroup meta_unary_cat
- *
- * \e UnaryTypeTrait to determine if _TypeT is void or a cv-qualified 
- * void.
- *
- * @tparam _TypeT The type to evaluate.
- */
 template <class _TypeT>
 struct is_void 
     : integral_constant<bool, _RW::__rw_is_void<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_cat
- *
- * \e UnaryTypeTrait to determine if _TypeT is an integral type.
- * Types \c bool, \c char, \c wchar_t, and the signed and unsigned
- * integer types are collectively called integral types. The signed
- * and unsigned integer types include signed and unsigned versions
- * of \c char, \c short, \c int, \c long and \c long \c long.
- *
- * @tparam _TypeT The type to evaluate.
- */
 template <class _TypeT>
 struct is_integral
     : integral_constant<bool, _RW::__rw_is_integral<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_cat
- *
- * * \e UnaryTypeTrait to determine if _TypeT is a floating point type.
- *
- * Types \c float, \c double, \c long \c double, and cv-qualified versions
- * of those types make up the set of floating point types.
- *
- * @tparam _TypeT The type to evaluate.
- */
 template <class _TypeT>
 struct is_floating_point
     : integral_constant<bool, _RW::__rw_is_floating_point<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_cat
- *
- * \e UnaryTypeTrait to determine if _TypeT is an array type. Array types
- * include both arrays of bounded and unbounded length.
- *
- * @tparam _TypeT The type to evaluate.
- */
 template <class _TypeT>
 struct is_array
     : integral_constant<bool, _RW::__rw_is_array<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_cat
- *
- * \e UnaryTypeTrait to determine if _TypeT is a pointer type.
- * Includes function pointers, but not pointers to non-static member
- * functions.
- *
- * @tparam _TypeT The type to evaluate.
- */
 template <class _TypeT>
 struct is_pointer
     : integral_constant<bool, _RW::__rw_is_pointer<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_cat
- *
- * \e UnaryTypeTrait to determine if _TypeT is an lvalue reference type.
- *
- * @tparam _TypeT The type to evaluate.
- */
 template <class _TypeT>
 struct is_lvalue_reference
     : integral_constant<bool, _RW::__rw_is_lvalue_reference<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_cat
- *
- * \e UnaryTypeTrait to determine if _TypeT is an rvalue reference type.
- *
- * @tparam _TypeT The type to evaluate.
- */
 template <class _TypeT>
 struct is_rvalue_reference
     : integral_constant<bool, _RW::__rw_is_rvalue_reference<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_cat
- *
- * \e UnaryTypeTrait to determine if _TypeT is a reference type.
- *
- * @note References to functions are still references, not functions.
- *
- * @tparam _TypeT The type to evaluate.
- */
 template <class _TypeT>
 struct is_reference
     : integral_constant<bool, _RW::__rw_is_reference<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_cat
- *
- * \e UnaryTypeTrait to determine if _TypeT is a pointer to non-static
- * member.
- *
- * @tparam _TypeT The type to evaluate.
- */
 template <class _TypeT>
 struct is_member_object_pointer
     : integral_constant<bool, _RW::__rw_is_member_object_pointer<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_cat
- *
- * \e UnaryTypeTrait to determine if _TypeT is a pointer to non-static
- * member function.
- *
- * @tparam _TypeT The type to evaluate.
- */
 template <class _TypeT>
 struct is_member_function_pointer
     : integral_constant<bool, _RW::__rw_is_member_function_pointer<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_cat
- *
- * \e UnaryTypeTrait to determine if _TypeT is an enumeration type.
- *
- * @note This may not be accurate if the necessary compiler support
- * is not available.
- *
- * @tparam _TypeT The type to evaluate.
- */
 template <class _TypeT>
 struct is_enum
     : integral_constant<bool, _RW::__rw_is_enum<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_cat
- *
- * \e UnaryTypeTrait to determine if _TypeT is a union type
- *
- * @note This may not be accurate if the necessary compiler support
- * is not available.
- */
 template <class _TypeT>
 struct is_union
     : integral_constant<bool, _RW::__rw_is_union<_TypeT>::value >
 {
 };
 
-/**
- * @ingroup meta_unary_cat
- *
- * \e UnaryTypeTrait to determine if _TypeT is a class type but not
- * a union type.
- *
- * @note This may not be accurate if the necessary compiler support
- * is not available.
- * @note a C++ struct is of class type.
- *
- * @tparam _TypeT The type to evaluate.
- */
 template <class _TypeT>
 struct is_class
    : integral_constant<bool, _RW::__rw_is_class<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_cat
- *
- * \e UnaryTypeTrait to determine if _TypeT is a function type.
- *
- * @note This may not be accurate if the necessary compiler support
- * is not available.
- *
- * @tparam _TypeT The type to evaluate.
- */
 template <class _TypeT>
 struct is_function
     : integral_constant<bool, _RW::__rw_is_function<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_comp
- *
- * \e UnaryTypeTrait to determine if _TypeT is an arithmetic type.
- * Arithmetic types include both integral and floating point types.
- *
- * @tparam _TypeT The type to evaluate.
- */
 template <class _TypeT>
 struct is_arithmetic
     : integral_constant<bool, _RW::__rw_is_arithmetic<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_comp
- *
- * \e UnaryTypeTrait to determine if _TypeT is a fundamental type.
- * Fundamental types are all the types provided natively. These types
- * include all arithmetic types and all void types.
- *
- * @tparam _TypeT The type to evaluate.
- */
 template <class _TypeT>
 struct is_fundamental
     : integral_constant<bool, _RW::__rw_is_fundamental<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_comp
- *
- * \e UnaryTypeTrait to determine if _TypeT is an object type.
- * An object type is a (possibly cv-qualified) type that is not
- * a function type, not a reference type, and not a void type.
- *
- * @tparam _TypeT The type to evaluate.
- */
 template <class _TypeT>
 struct is_object
     : integral_constant<bool, _RW::__rw_is_object<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_comp
- *
- * \e UnaryTypeTrait to determine if _TypeT is a scalar type.
- * Arithmetic types, enumeration types, pointer types, pointer
- * to member types, and cv-qualified versions of these types are
- * collectively called scalar types.
- *
- * @tparam _TypeT The type to evaluate.
- */
 template <class _TypeT>
 struct is_scalar
     : integral_constant<bool, _RW::__rw_is_scalar<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_comp
- *
- * \e UnaryTypeTrait to determine if _TypeT is a compound type.
- * Compound types are arrays, functions, pointers, references,
- * classes, unions, enumerations and pointers to non-static class
- * members.
- *
- * @tparam _TypeT The type to evaluate.
- */
 template <class _TypeT>
 struct is_compound
     : integral_constant<bool, _RW::__rw_is_compound<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_comp
- *
- * \e UnaryTypeTrait to determine if _TypeT is a pointer to a member
- * object or pointer to member function type.
- *
- * @tparam _TypeT The type to evaluate.
- */
 template <class _TypeT>
 struct is_member_pointer
     : integral_constant<bool, _RW::__rw_is_member_pointer<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_prop
- *
- * \e UnaryTypeTrait to determine if _TypeT is const-qualified.
- *
- * @tparam _TypeT The type to evaluate.
- */
 template <class _TypeT>
 struct is_const
     : integral_constant<bool, _RW::__rw_is_const<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_prop
- *
- * \e UnaryTypeTrait to determine if _TypeT is volatile-qualified.
- *
- * @tparam _TypeT The type to evaluate.
- */
 template <class _TypeT>
 struct is_volatile
     : integral_constant<bool, _RW::__rw_is_volatile<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_prop
- *
- * \e UnaryTypeTrait to determine if _TypeT is a trivial type. Scalar
- * types, trivial class types, arrays of such types and cv-qualified
- * versions of these types are collectively called trival types. Trivial
- * class types have a trivial default constructor, a trivial destructor
- * a trivial copy constructor and a trivial copy assignment operator.
- *
- * @note This may not be accurate if the necessary compiler support
- * is not available.
- *
- * @tparam _TypeT The type to evaluate. Shall be a complete type,
- * an array of unknown bound, or possibly cv-qualified void.
- */
 template <class _TypeT>
 struct is_trivial
     : integral_constant<bool, _RW::__rw_is_trivial<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_prop
- *
- * \e UnaryTypeTrait to determine if _TypeT is a type with standard
- * layout. Scalar types, standard-layout class types, arrays of such
- * types and cv-qualified versions of these types are collectively
- * called standard layout types. Standard layout class types have no
- * non-static data members of non-standard-layout class or reference.
- * They have no virtual functions and no virtual base classes, use the
- * same access control for all non-static data members, have no base
- * classes of non-standard-layout type, no non-static data members in
- * the most-derived class and at most one base class with non-static
- * data members or has no base classes with non-static data members.
- * Finally, a standard-layout class has no base classes of the same
- * type as the first non-static data member.
- *
- * @note This may not be accurate if the necessary compiler support
- * is not available.
- *
- * @tparam _TypeT The type to evaluate. Shall be a complete type,
- * an array of unknown bound, or possibly cv-qualified void.
- */
 template <class _TypeT>
 struct is_standard_layout
     : integral_constant<bool, _RW::__rw_is_standard_layout<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_prop
- *
- * \e UnaryTypeTrait to determine if _TypeT is a plain-old-data type.
- * Scalar types, pod classes, arrays of such types and cv-qualified
- * versions of these types are collectively called pod types. The pod
- * class types meet the requirements of both trivial and standard layout
- * types and have no non-static data members of non-pod type.
- *
- * @note This may not be accurate if the necessary compiler support
- * is not available.
- *
- * @tparam _TypeT The type to evaluate. Shall be a complete type,
- * an array of unknown bound, or possibly cv-qualified void.
- */
 template <class _TypeT>
 struct is_pod
     : integral_constant<bool, _RW::__rw_is_pod<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_prop
- *
- * \e UnaryTypeTrait to determine if _TypeT is an empty class.
- *
- * @note This may not be accurate if the necessary compiler support
- * is not available.
- *
- * @tparam _TypeT The type to evaluate. Shall be a complete type,
- * an array of unknown bound, or possibly cv-qualified void.
- */
 template <class _TypeT>
 struct is_empty
     : integral_constant<bool, _RW::__rw_is_empty<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_prop
- *
- * \e UnaryTypeTrait to determine if _TypeT is a polymorphic class.
- *
- * @note This may not be accurate if the necessary compiler support
- * is not available.
- *
- * @tparam _TypeT The type to evaluate. Shall be a complete type,
- * an array of unknown bound, or possibly cv-qualified void.
- */
 template <class _TypeT>
 struct is_polymorphic
     : integral_constant<bool, _RW::__rw_is_polymorphic<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_prop
- *
- * \e UnaryTypeTrait to determine if _TypeT is an abstract class.
- *
- * @note This may not be accurate if the necessary compiler support
- * is not available.
- *
- * @tparam _TypeT The type to evaluate. Shall be a complete type,
- * an array of unknown bound, or possibly cv-qualified void.
- */
 template <class _TypeT>
 struct is_abstract
     : integral_constant<bool, _RW::__rw_is_abstract<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_prop
- *
- * \e UnaryTypeTrait to determine if _TypeT is a trivial type or a
- * class type with a trivial default constructor, or an array of
- * such a class type.
- *
- * @note This may not be accurate for class types if the necessary
- * compiler support is not available.
- *
- * @tparam _TypeT The type to evaluate. Shall be a complete type,
- * an array of unknown bound, or possibly cv-qualified void.
- */
 template <class _TypeT>
 struct has_trivial_default_constructor
     : integral_constant<bool, _RW::__rw_has_trivial_ctor<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_prop
- *
- * \e UnaryTypeTrait to determine if _TypeT is a trivial type, a
- * reference type, or a class type with a trivial copy constructor.
- *
- * @note This may not be accurate for class types if the necessary
- * compiler support is not available.
- *
- * @tparam _TypeT The type to evaluate. Shall be a complete type,
- * an array of unknown bound, or possibly cv-qualified void.
- */
 template <class _TypeT>
 struct has_trivial_copy_constructor
     : integral_constant<bool, _RW::__rw_has_trivial_copy<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_prop
- *
- * \e UnaryTypeTrait to determine if _TypeT is neither const nor a
- * reference type and is a trivial type or a class type with a trivial
- * assignment operator.
- *
- * @note This may not be accurate for class types if the necessary
- * compiler support is not available.
- *
- * @tparam _TypeT The type to evaluate. Shall be a complete type,
- * an array of unknown bound, or possibly cv-qualified void.
- */
 template <class _TypeT>
 struct has_trivial_assign
     : integral_constant<bool, _RW::__rw_has_trivial_assign<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_prop
- *
- * \e UnaryTypeTrait to determine if _TypeT is a trivial type, a reference
- * type, or a class type with a trivial destructor, or an array of such a
- * class type.
- *
- * @note This may not be accurate for class types if the necessary
- * compiler support is not available.
- *
- * @tparam _TypeT The type to evaluate. Shall be a complete type,
- * an array of unknown bound, or possibly cv-qualified void.
- */
 template <class _TypeT>
 struct has_trivial_destructor
     : integral_constant<bool, _RW::__rw_has_trivial_dtor<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_prop
- *
- * \e UnaryTypeTrait to determine if the default constructor for _TypeT
- * has an empty exception specification or can otherwise be deduced to
- * never throw an exception.
- *
- * @note This may not be accurate for class types if the necessary
- * compiler support is not available.
- *
- * @tparam _TypeT The type to evaluate. Shall be a complete type,
- * an array of unknown bound, or possibly cv-qualified void.
- */
 template <class _TypeT>
 struct has_nothrow_default_constructor
     : integral_constant<bool, _RW::__rw_has_nothrow_ctor<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_prop
- *
- * \e UnaryTypeTrait to determine if the copy constructor for _TypeT has
- * an empty exception specification or can otherwise be deduced to never
- * throw an exception.
- *
- * @note This may not be accurate for class types if the necessary
- * compiler support is not available.
- *
- * @tparam _TypeT The type to evaluate. Shall be a complete type,
- * an array of unknown bound, or possibly cv-qualified void.
- */
 template <class _TypeT>
 struct has_nothrow_copy_constructor
     : integral_constant<bool, _RW::__rw_has_nothrow_copy<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_prop
- *
- * \e UnaryTypeTrait to determine if the assignment operator has an empty
- * exception specification or can otherwise be deduced never to throw an
- * exception.
- *
- * @note This may not be accurate for class types if the necessary
- * compiler support is not available.
- *
- * @tparam _TypeT The type to evaluate. Shall be a complete type,
- * an array of unknown bound, or possibly cv-qualified void.
- */
 template <class _TypeT>
 struct has_nothrow_assign
     : integral_constant<bool, _RW::__rw_has_nothrow_assign<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_prop
- *
- * \e UnaryTypeTrait to determine if _TypeT has a virtual destructor.
- *
- * @note This may not be accurate for class types if the necessary
- * compiler support is not available.
- *
- * @tparam _TypeT The type to evaluate. Shall be a complete type,
- * an array of unknown bound, or possibly cv-qualified void.
- */
 template <class _TypeT>
 struct has_virtual_destructor
     : integral_constant<bool, _RW::__rw_has_virtual_dtor<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_prop
- *
- * \e UnaryTypeTrait to determine if _TypeT is a signed arithmetic
- * type.
- *
- * @tparam _TypeT The type to evaluate.
- */
 template <class _TypeT>
 struct is_signed
     : integral_constant<bool, _RW::__rw_is_signed<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_prop
- *
- * \e UnaryTypeTrait to determine if _TypeT is an unsigned arithmetic
- * type.
- *
- * @tparam _TypeT The type to evaluate.
- */
 template <class _TypeT>
 struct is_unsigned
     : integral_constant<bool, _RW::__rw_is_unsigned<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_prop
- *
- * \e UnaryTypeTrait to determine the alignment of objects of type
- * _TypeT.
- *
- * @note This may not be accurate if the necessary compiler support
- * is not available.
- *
- * @tparam _TypeT The type to evaluate.
- */
+#ifndef _RWSTD_NO_ALIGN_TRAITS
+
 template <class _TypeT>
 struct alignment_of
     : integral_constant<_RWSTD_SIZE_T, _RW::__rw_alignment_of<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_prop
- *
- * \e UnaryTypeTrait to determine the rank of objects of type _TypeT.
- * If _TypeT names an array type, the rank is an integer value that
- * represents the number of dimensions of _TypeT, otherwise the value
- * is 0.
- *
- * @tparam _TypeT The type to evaluate.
- */
+#endif // _RWSTD_NO_ALIGN_TRAITS
+
 template <class _TypeT>
 struct rank
     : integral_constant<_RWSTD_SIZE_T, _RW::__rw_rank<_TypeT>::value>
 {
 };
 
-/**
- * @ingroup meta_unary_prop
- *
- * \e UnaryTypeTrait to determine if the extent of one dimension of
- * objects of type _TypeT. If _TypeT is an array type with rank greater
- * than _Bound, the value will be the size of the given dimension of
- * that array, otherwise the value is 0.
- *
- * @tparam _TypeT The type to evaluate.
- * @tparam _Bound The dimension of the array to get the extent of.
- */
 template <class _TypeT, unsigned _Bound = 0>
 struct extent
     : integral_constant<_RWSTD_SIZE_T, _RW::__rw_extent<_TypeT, _Bound>::value>
 {
 };
 
-/**
- * @ingroup meta_rel
- *
- * \e UnaryTypeTrait to determine if _TypeT and _TypeU are exactly the
- * same type.
- *
- * @tparam _TypeT The first type to compare.
- * @tparam _TypeT The second type to compare.
- */
 template <class _TypeT, class _TypeU>
 struct is_same
     : integral_constant<bool, _RW::__rw_is_same<_TypeT, _TypeU>::value>
 {
 };
 
-/**
- * @ingroup meta_rel
- *
- * \e BinaryyTypeTrait to determine if _TypeT is a base class of _TypeU
- * or _TypeT and _TypeU name the same non-union class type without regard
- * to cv-qualifiers.
- *
- * @note Base classes that are private, protected or ambiguous are,
- * nonetheless, base classes.
- *
- * @note This may not be accurate for class types if the necessary
- * compiler support is not available.
- *
- * @tparam _TypeT The base type.
- * @tparam _TypeU The derived type.
- */
 template <class _TypeT, class _TypeU>
 struct is_base_of
     : integral_constant<bool, _RW::__rw_is_base_of<_TypeT, _TypeU>::value>
 {
 };
 
-/**
- * @ingroup meta_rel
- *
- * \e BinaryTypeTrait to determine if lvalue of type _TypeT is implicitly
- * convertible to _TypeU ([conv]).
- *
- * @note This may not be accurate for class types if the necessary
- * compiler support is not available.
- *
- * @tparam _TypeT The type to test conversion from.
- * @tparam _TypeT The type to test conversion to.
- */
 template <class _TypeT, class _TypeU>
 struct is_convertible
     : integral_constant<bool, _RW::__rw_is_convertible<_TypeT, _TypeU>::value>
 {
 };
 
-/**
- * @ingroup meta_trans_cv
- *
- * \e TransformationTrait to remove any top-level const-qualifier.
- * The member typedef \c type shall be the same as _TypeT except that
- * any top level const-qualifier has been removed.
- *
- * @tparam _TypeT The type to transform.
- */
 template <class _TypeT>
 struct remove_const
 {
-    typedef _TYPENAME _RW::__rw_remove_const<_TypeT>::type type;
+    typedef typename _RW::__rw_remove_const<_TypeT>::type type;
 };
 
-/**
- * @ingroup meta_trans_cv
- *
- * \e TransformationTrait to remove any top-level volatile-qualifier.
- * The member typedef \c type shall be the same as _TypeT except that
- * any top level volatile-qualifier has been removed.
- *
- * @tparam _TypeT The type to transform.
- */
 template <class _TypeT>
 struct remove_volatile
 {
-    typedef _TYPENAME _RW::__rw_remove_volatile<_TypeT>::type type;
+    typedef typename _RW::__rw_remove_volatile<_TypeT>::type type;
 };
 
-/**
- * @ingroup meta_trans_cv
- *
- * \e TransformationTrait to remove any top-level cv-qualifiers. The
- * member typedef \c type shall be the same as _TypeT except that any
- * top level cv-qualifier has been removed.
- *
- * @tparam _TypeT The type to transform.
- */
 template <class _TypeT>
 struct remove_cv
 {
-    typedef _TYPENAME _RW::__rw_remove_cv<_TypeT>::type type;
+    typedef typename _RW::__rw_remove_cv<_TypeT>::type type;
 };
 
-/**
- * @ingroup meta_trans_cv
- *
- * \e TransformationTrait to add a top-level const-qualifier. If
- * _TypeT is a reference, function, or other type level const-
- * qualified type then \c type shall be the same as _TypeT,
- * otherwise _TypeT const.
- *
- * @tparam _TypeT The type to transform.
- */
 template <class _TypeT>
 struct add_const
 {
-    typedef _TYPENAME _RW::__rw_add_const<_TypeT>::type type;
+    typedef typename _RW::__rw_add_const<_TypeT>::type type;
 };
 
-/**
- * @ingroup meta_trans_cv
- *
- * \e TransformationTrait to add a top-level volatile-qualifier.
- * If _TypeT is a reference, function, or other type level volatile-
- * qualified type then \c type shall be the same as _TypeT,
- * otherwise _TypeT volatile.
- *
- * @tparam _TypeT The type to transform.
- */
 template <class _TypeT>
 struct add_volatile
 {
-    typedef _TYPENAME _RW::__rw_add_volatile<_TypeT>::type type;
+    typedef typename _RW::__rw_add_volatile<_TypeT>::type type;
 };
 
-/**
- * @ingroup meta_trans_cv
- *
- * \e TransformationTrait to add a top-level const and volatile-qualifier.
- *
- * @tparam _TypeT The type to transform.
- */
 template <class _TypeT>
 struct add_cv
 {
-    typedef _TYPENAME _RW::__rw_add_cv<_TypeT>::type type;
+    typedef typename _RW::__rw_add_cv<_TypeT>::type type;
 };
 
-/**
- * @ingroup meta_trans_ref
- *
- * \e TransformationTrait to remove a reference from _TypeT.
- *
- * The member typedef \c type shall be the same as _TypeT, except
- * any reference qualifier has been removed.
- *
- * @tparam _TypeT The type to transform.
- */
 template <class _TypeT>
 struct remove_reference
 {
-    typedef _TYPENAME _RW::__rw_remove_reference<_TypeT>::type type;
+    typedef typename _RW::__rw_remove_reference<_TypeT>::type type;
 };
 
-/**
- * @ingroup meta_trans_ref
- * 
- * \e TransformationTrait to add a reference to _TypeT.
- *
- * @tparam _TypeT The type to transform.
- */
 template <class _TypeT>
 struct add_lvalue_reference
 {
-    typedef _TYPENAME _RW::__rw_add_lvalue_reference<_TypeT>::type type;
+    typedef typename _RW::__rw_add_lvalue_reference<_TypeT>::type type;
 };
 
-/**
- * @ingroup meta_trans_ref
- *
- * \e TransformationTrait to add an rvalue-reference to _TypeT.
- *
- * @tparam _TypeT The type to transform.
- */
 template <class _TypeT>
 struct add_rvalue_reference
 {
-    typedef _TYPENAME _RW::__rw_add_rvalue_reference<_TypeT>::type type;
+    typedef typename _RW::__rw_add_rvalue_reference<_TypeT>::type type;
 };
 
-/**
- * @ingroup meta_trans_sign
- *
- * \e TransformationTrait to get a signed type from an enum or non-
- * boolean integral type.
- *
- * @tparam _TypeT The type to transform.
- */
 template <class _TypeT>
 struct make_signed
 {
-    typedef _TYPENAME _RW::__rw_make_signed<_TypeT>::type type;
+    typedef typename _RW::__rw_make_signed<_TypeT>::type type;
 };
 
-/**
- * @ingroup meta_trans_sign
- *
- * \e TransformationTrait to get an unsigned type from an enum or non-
- * boolean integral type.
- *
- * @tparam _TypeT The type to transform.
- */
 template <class _TypeT>
 struct make_unsigned
 {
-    typedef _TYPENAME _RW::__rw_make_unsigned<_TypeT>::type type;
+    typedef typename _RW::__rw_make_unsigned<_TypeT>::type type;
 };
 
-/**
- * @ingroup meta_trans_arr
- *
- * \e TransformationTrait to remove a dimension from the type _TypeT.
- * If _TypeT is 'array of _TypeU', the member typedef \c type shall
- * be _TypeU, otherwise _TypeT.
- *
- * @tparam _TypeT The type to transform.
- */
 template <class _TypeT>
 struct remove_extent
 {
-    typedef _TYPENAME _RW::__rw_remove_extent<_TypeT>::type type;
+    typedef typename _RW::__rw_remove_extent<_TypeT>::type type;
 };
 
-/**
- * @ingroup meta_trans_arr
- *
- * \e TransformationTrait to remove all dimensions from the type
- * _TypeT. If _TypeT is 'multi-dimensional array of _TypeU', the
- * member typedef \c type shall be _TypeU otherwise _TypeT.
- *
- * @tparam _TypeT The type to transform.
- */
 template <class _TypeT>
 struct remove_all_extents
 {
-    typedef _TYPENAME _RW::__rw_remove_all_extents<_TypeT>::type type;
+    typedef typename _RW::__rw_remove_all_extents<_TypeT>::type type;
 };
 
-/**
- * @ingroup meta_trans_pointer
- *
- * \e TransformationTrait to remove a pointer from the type _TypeT.
- * The member typedef \c type shall be the same as _TypeT, except
- * any top level indirection has been removed.
- *
- * @note pointers to members are left unchanged.
- *
- * @tparam _TypeT The type to transform.
- */
 template <class _TypeT>
 struct remove_pointer
 {
-    typedef _TYPENAME _RW::__rw_remove_pointer<_TypeT>::type type;
+    typedef typename _RW::__rw_remove_pointer<_TypeT>::type type;
 };
 
-/**
- * @ingroup meta_trans_pointer
- *
- * \e TransformationTrait to add a pointer to the type _TypeT.
- *
- * @tparam _TypeT The type to transform.
- */
 template <class _TypeT>
 struct add_pointer
 {
-    typedef _TYPENAME _RW::__rw_add_pointer<_TypeT>::type type;
+    typedef typename _RW::__rw_add_pointer<_TypeT>::type type;
 };
 
-/**
- * @ingroup meta_trans_other
- *
- * Special trait the defines a nested pod type that is suitable for
- * use as uninitialized storage for any object whose size is at most
- * _Len and alignment is a divisor of align.
- *
- * @tparam _Len The minimum size of the aligned storage. Shall not be 0.
- * @tparam _Align The alignment of the aligned storage. Shall be equal
- * to alignment_of<T> for some type T or not provided. The implementation
- * requires that the alignment value be a non-zero power of two that is
- * less than the maximum supported extended alignment.
- */
+#ifndef _RWSTD_NO_ALIGN_TRAITS
+
 template <_RWSTD_SIZE_T _Len,
           _RWSTD_SIZE_T _Align = _RW::__rw_default_alignment<_Len>::value>
 struct aligned_storage
 {
-    typedef _TYPENAME _RW::__rw_aligned_storage<_Len, _Align>::type type;
+    typedef typename _RW::__rw_aligned_storage<_Len, _Align>::type type;
 };
 
-#ifndef _RWSTD_NO_VARIADIC_TEMPLATES
+#  ifndef _RWSTD_NO_VARIADIC_TEMPLATES
 
-/**
- * @ingroup meta_trans_other
- *
- * Special trait the defines a nested pod type that is suitable for
- * use as uninitialized storage for any object whose type is listed
- * in _Types and whose size is at most _Len.
- *
- * @tparam _Len The minimum size of the aligned storage.
- * @tparam _Types List of types which might be stored.
- */
 template <_RWSTD_SIZE_T _Len, class _TypeT, class... _Types>
 struct aligned_union
     : _RW::__rw_aligned_union<_Len, _TypeT, _Types...>
 {
+    static const _RWSTD_SIZE_T alignment_value =
+      _RW::__rw_aligned_union<_Len, _TypeT, _Types...>::_C_align_value;
 };
 
-#else
+#  else  // !_RWSTD_NO_VARIADIC_TEMPLATES
 
-/**
- * @ingroup meta_trans_other
- *
- * Special trait the defines a nested pod type that is suitable for
- * use as uninitialized storage for any object whose type is listed
- * in _Types and whose size is at most _Len.
- *
- * @tparam _Len The minimum size of the aligned storage.
- * @tparam _Type1 Type which might be stored.
- * @tparam _Type2 Type which might be stored.
- * @tparam _Type3 Type which might be stored.
- * @tparam _Type4 Type which might be stored.
- * @tparam _Type5 Type which might be stored.
- * @tparam _Type6 Type which might be stored.
- * @tparam _Type7 Type which might be stored.
- * @tparam _Type8 Type which might be stored.
- */
 template <_RWSTD_SIZE_T _Len,
           class _Type1                  , class _Type2 = _RW::__rw_empty,
           class _Type3 = _RW::__rw_empty, class _Type4 = _RW::__rw_empty,
@@ -1256,39 +457,22 @@
                               _Type1, _Type2, _Type3, _Type4,
                               _Type5, _Type6, _Type7, _Type8>
 {
+    static const _RWSTD_SIZE_T alignment_value =
+      _RW::__rw_aligned_union<_Len, _Type1, _Type2,
+                                    _Type3, _Type4,
+                                    _Type5, _Type6,
+                                    _Type7, _Type8>::_C_align_value;
 };
 
-#endif
+#  endif // !_RWSTD_NO_VARIADIC_TEMPLATES
+#endif // !_RWSTD_NO_ALIGN_TRAITS
 
-/**
- * @ingroup meta_trans_other
- *
- * \e TransformationTrait to do array-to-pointer and function-to-pointer
- * type conversions.
- *
- * Let \c U be \c remove_reference<T>::type. If \c is_array<U>::value is
- * true, the member typedef type shall equal remove_extent<U>::type*. If
- * \c is_function<U>::value is true, the member typedef shall equal
- * \c add_pointer<U>::type. Otherwise the member typedef type equals \c U.
- *
- * @tparam _TypeT The type to transform.
- */
 template <class _TypeT>
 struct decay
 {
-    typedef _TYPENAME _RW::__rw_decay<_TypeT>::type type;
+    typedef typename _RW::__rw_decay<_TypeT>::type type;
 };
-    
-/**
- * @ingroup meta_trans_other
- *
- * If _Enable is true, the member typedef \c type shall equal _TypeT;
- * otherwise, there shall be no member typedef \c type.
- *
- * @tparam _Enable Flag used to select the primary template or the
- * specialization.
- * @tparam _TypeT The type of the member typedef if _Enable is true.
- */
+
 template <bool _Enable, class _TypeT = void>
 struct enable_if
 {
@@ -1299,22 +483,11 @@
 struct enable_if<false, _TypeT>
 {
 };
-    
-/**
- * @ingroup meta_trans_other
- *
- * If _Select is true, the member typedef \c type shall equal _TypeT
- * otherwise \c type shall equal _TypeU.
- *
- * @tparam _Select Flag used to select the primary template or the
- * specialization.
- * @tparam _TypeT The type of the member typedef if _Select is true.
- * @tparam _TypeU The type of the member typedef if _Select is false.
- */
+
 template <bool _Select, class _TypeT, class _TypeU>
 struct conditional
 {
-    typedef _TYPENAME
+    typedef typename
     _RW::__rw_conditional<_Select, _TypeT, _TypeU>::type type;
 };
 
diff --git a/include/utility b/include/utility
index 9d4c183..2845d81 100644
--- a/include/utility
+++ b/include/utility
@@ -46,6 +46,11 @@
 
 #include <rw/_pair.h>
 #include <rw/_relops.h>
+
+#ifndef _RWSTD_NO_EXT_CXX_0X
+#  include <rw/_ref_wrap.h>
+#endif
+
 #include <rw/_defs.h>
 
 
diff --git a/include/valarray b/include/valarray
index a96a37e..abca28a 100644
--- a/include/valarray
+++ b/include/valarray
@@ -77,7 +77,7 @@
     valarray () { }
 
     // 26.3.2.1, p2
-    _EXPLICIT valarray (_RWSTD_SIZE_T __size)
+    explicit valarray (_RWSTD_SIZE_T __size)
         : _C_array (value_type (), __size) { }
 
     // 26.3.2.1, p3
@@ -238,12 +238,12 @@
 
 // implements symmetric non-member valarray binary operators
 template<class _TypeT, class _BinaryFunction>
-inline _STD::valarray<_TYPENAME _BinaryFunction::result_type>
+inline _STD::valarray<typename _BinaryFunction::result_type>
 __rw_binary_function (const _STD::valarray<_TypeT> &__lhs, 
                       const _STD::valarray<_TypeT> &__rhs, 
                       _BinaryFunction               __fun)
 {
-    typedef _TYPENAME _BinaryFunction::result_type                result_type;
+    typedef typename _BinaryFunction::result_type                result_type;
     typedef _STD::raw_storage_iterator<result_type*, result_type> _Iter;
 
     // allocate but do not initialize
@@ -261,11 +261,11 @@
 
 // implements asymmetric non-member valarray binary operators
 template<class _TypeT, class _BinaryFunction>
-inline _STD::valarray<_TYPENAME _BinaryFunction::result_type>
+inline _STD::valarray<typename _BinaryFunction::result_type>
 __rw_binary_function (const _STD::valarray<_TypeT> &__val, 
                       _BinaryFunction               __fun)
 {
-    typedef _TYPENAME _BinaryFunction::result_type                result_type;
+    typedef typename _BinaryFunction::result_type                result_type;
     typedef _STD::raw_storage_iterator<result_type*, result_type> _Iter;
 
     // allocate but do not initialize
diff --git a/include/vector b/include/vector
index d6fbd87..604499c 100644
--- a/include/vector
+++ b/include/vector
@@ -58,8 +58,6 @@
 template <class _TypeT, class _Allocator = allocator<_TypeT> >
 class vector;
 
-#ifdef _RWSTD_NO_MEMBER_TEMPLATES
-
 // declarations of non-member function templates implementing
 // the functionality of vector member function templates
 
@@ -83,8 +81,6 @@
 void __rw_insert_range (vector<_TypeT, _Allocator>*, _VectorIter,
                         _FwdIter, _FwdIter, forward_iterator_tag);
 
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
-
 
 _EXPORT
 template <class _TypeT, class _Allocator>
@@ -94,12 +90,12 @@
 
     typedef _TypeT                                     value_type;
     typedef _Allocator                                 allocator_type;
-    typedef _TYPENAME allocator_type::size_type        size_type;
-    typedef _TYPENAME allocator_type::difference_type  difference_type;
-    typedef _TYPENAME allocator_type::reference        reference;
-    typedef _TYPENAME allocator_type::const_reference  const_reference;
-    typedef _TYPENAME allocator_type::pointer          pointer;
-    typedef _TYPENAME allocator_type::const_pointer    const_pointer;
+    typedef typename allocator_type::size_type        size_type;
+    typedef typename allocator_type::difference_type  difference_type;
+    typedef typename allocator_type::reference        reference;
+    typedef typename allocator_type::const_reference  const_reference;
+    typedef typename allocator_type::pointer          pointer;
+    typedef typename allocator_type::const_pointer    const_pointer;
     typedef _RWSTD_ALLOC_TYPE (allocator_type, value_type) _C_value_alloc_type;
 
 public:
@@ -155,11 +151,11 @@
 
 public:
 
-    _EXPLICIT
+    explicit
     vector (const allocator_type &__alloc = allocator_type ())
         : allocator_type (__alloc), _C_begin (), _C_end (), _C_bufend () { }
 
-    _EXPLICIT
+    explicit
     vector (size_type __n, const_reference __x = value_type (),
             const allocator_type &__alloc = allocator_type ())
         : allocator_type (__alloc), _C_begin (), _C_end (), _C_bufend () {
@@ -328,8 +324,6 @@
     // implements insert with repetition
     void _C_insert_n (const iterator&, size_type, const_reference);
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
     // implements range insert for ForwardIterators
     template <class _FwdIter>
     void _C_insert_range (iterator, _FwdIter, _FwdIter,
@@ -340,12 +334,6 @@
     void _C_insert_range (iterator, _InputIter, _InputIter,
                           input_iterator_tag);
 
-#else   // if defined (_RWSTD_NO_MEMBER_TEMPLATES)
-
-public:
-
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
-
     // implements range assign
     template <class _InputIter>
     void _C_assign (_InputIter __first, _InputIter __last, void*) {
@@ -414,7 +402,7 @@
 
 
 template <class _TypeT, class _Allocator>
-inline _TYPENAME vector<_TypeT, _Allocator>::reference
+inline typename vector<_TypeT, _Allocator>::reference
 vector<_TypeT, _Allocator>::
 operator[] (size_type __n)
 {
@@ -432,7 +420,7 @@
   
 
 template <class _TypeT, class _Allocator>
-inline _TYPENAME vector<_TypeT, _Allocator>::const_reference
+inline typename vector<_TypeT, _Allocator>::const_reference
 vector<_TypeT, _Allocator>::
 operator[] (size_type __n) const
 {
@@ -450,7 +438,7 @@
   
 
 template <class _TypeT, class _Allocator>
-inline _TYPENAME vector<_TypeT, _Allocator>::reference
+inline typename vector<_TypeT, _Allocator>::reference
 vector<_TypeT, _Allocator>::
 at (size_type __n)
 {
@@ -463,7 +451,7 @@
     
 
 template <class _TypeT, class _Allocator>
-inline _TYPENAME vector<_TypeT, _Allocator>::const_reference
+inline typename vector<_TypeT, _Allocator>::const_reference
 vector<_TypeT, _Allocator>::
 at (size_type __n)  const
 {
@@ -517,7 +505,7 @@
 
 
 template <class _TypeT, class _Allocator>
-inline _TYPENAME vector<_TypeT, _Allocator>::iterator
+inline typename vector<_TypeT, _Allocator>::iterator
 vector<_TypeT, _Allocator>::
 insert (iterator __it, const_reference __x)
 {
@@ -535,7 +523,7 @@
 
 
 template <class _TypeT, class _Allocator>
-inline _TYPENAME vector<_TypeT, _Allocator>::iterator
+inline typename vector<_TypeT, _Allocator>::iterator
 vector<_TypeT, _Allocator>::
 erase (iterator __it)
 {
@@ -555,7 +543,7 @@
 
 
 template <class _TypeT, class _Allocator>
-inline _TYPENAME vector<_TypeT, _Allocator>::iterator
+inline typename vector<_TypeT, _Allocator>::iterator
 vector<_TypeT, _Allocator>::
 erase (iterator __first, iterator __last)
 {
@@ -690,11 +678,11 @@
 
 vector<bool, _Allocator >: private _Allocator
 {
-#if defined (_RWSTD_NO_CLASS_PARTIAL_SPEC) && !defined (_RWSTD_NO_TYPENAME)
-    // clear _TYPENAME
-#  undef _TYPENAME
-#  define _TYPENAME
-#endif  // _RWSTD_NO_CLASS_PARTIAL_SPEC && !_RWSTD_NO_TYPENAME
+#if defined (_RWSTD_NO_CLASS_PARTIAL_SPEC)
+    // clear typename
+#  undef typename
+#  define typename
+#endif  // _RWSTD_NO_CLASS_PARTIAL_SPEC
 
     typedef _RWSTD_REBIND(_Allocator, unsigned int)       _C_value_alloc_type;
     typedef vector                                        _C_self;
@@ -703,16 +691,16 @@
     typedef _Allocator                                      allocator_type;
     typedef bool                                            value_type;
 
-    typedef _TYPENAME allocator_type::size_type             size_type;
-    typedef _TYPENAME allocator_type::difference_type       difference_type;
-    typedef _TYPENAME _C_value_alloc_type::pointer          pointer;
-    typedef _TYPENAME _C_value_alloc_type::const_pointer    const_pointer;
+    typedef typename allocator_type::size_type             size_type;
+    typedef typename allocator_type::difference_type       difference_type;
+    typedef typename _C_value_alloc_type::pointer          pointer;
+    typedef typename _C_value_alloc_type::const_pointer    const_pointer;
 
-#if defined (_RWSTD_NO_CLASS_PARTIAL_SPEC) && !defined (_RWSTD_NO_TYPENAME)
-    // restore _TYPENAME
-#  undef _TYPENAME
-#  define _TYPENAME   typename
-#endif  // _RWSTD_NO_CLASS_PARTIAL_SPEC && !_RWSTD_NO_TYPENAME
+#if defined (_RWSTD_NO_CLASS_PARTIAL_SPEC)
+    // restore typename
+#  undef typename
+#  define typename   typename
+#endif  // _RWSTD_NO_CLASS_PARTIAL_SPEC
 
     class iterator;
     class const_iterator;
@@ -1117,7 +1105,7 @@
 
 #if !defined (__SUNPRO_CC) || __SUNPRO_CC > 0x530
     // working around a SunPro 5.3 bug (see PR #25962)
-    _EXPLICIT
+    explicit
 #endif   // SunPro > 5.3
     vector (size_type __n, bool __val = bool (), 
        const _Allocator&  __alloc = allocator_type ())
@@ -1291,6 +1279,7 @@
         else
             _C_insert(end(), __x);
     }
+
     void pop_back () { --_C_end; }
 
     iterator insert (iterator __it, const bool& __x = bool())
@@ -1304,16 +1293,12 @@
         _C_insert(__it, __x);
       return begin() + __n;
     }
+
     void insert (iterator __it, size_type __n, const bool& __x);
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
     template<class _InputIter>
     void insert (iterator __it, _InputIter __first,
                  _InputIter __last);
-#else
-    void insert (iterator __it, const_iterator __first, 
-                 const_iterator __last);
-#endif
 
     iterator erase (iterator __it)
     {
@@ -1322,11 +1307,13 @@
       --_C_end;
       return __it;
     }
+
     iterator erase(iterator __first, iterator __last)
     {
       _C_end = _C_copy(__last, end(), __first);
       return __first;
     }
+
     void swap (_C_self& __x)
     {
       if((_C_value_alloc_type)*this == (_C_value_alloc_type)__x)
@@ -1342,8 +1329,11 @@
         __x=_x;
       } 
     }
+
     static void swap(reference __x, reference __y);
+
     void flip ();
+
     void clear()
     {
       erase(begin(),end());
diff --git a/include/vector.cc b/include/vector.cc
index f6306a0..9935067 100644
--- a/include/vector.cc
+++ b/include/vector.cc
@@ -318,8 +318,6 @@
 }
 
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
 template<class _TypeT, class _Allocator>
 template<class _InputIter>
 void vector<_TypeT, _Allocator>::
@@ -327,17 +325,6 @@
 {
     vector* const __self = this;
 
-#else   // if defined (_RWSTD_NO_MEMBER_TEMPLATES)
-
-template<class _TypeT, class _Allocator, class _InputIter>
-void 
-__rw_assign_range (vector<_TypeT, _Allocator> *__self,
-                   _InputIter __first, _InputIter __last, input_iterator_tag)
-{
-    typedef _TYPENAME vector<_TypeT, _Allocator>::iterator iterator;
-
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
-
     _RWSTD_ASSERT_RANGE (__first, __last);
 
 #ifndef _RWSTD_NO_EXT_VECTOR_ASSIGN_IN_PLACE
@@ -384,8 +371,6 @@
 }
 
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
 template <class _TypeT, class _Allocator>
 template <class _FwdIter>
 void vector<_TypeT, _Allocator>::
@@ -393,23 +378,6 @@
 {
     vector* const __self = this;
 
-#else   // if defined (_RWSTD_NO_MEMBER_TEMPLATES)
-
-template <class _TypeT, class _Allocator, class _FwdIter>
-void
-__rw_assign_range (vector<_TypeT, _Allocator> *__self,
-                   _FwdIter __first, _FwdIter __last, forward_iterator_tag)
-{
-    typedef _TYPENAME vector<_TypeT, _Allocator>::value_type value_type;
-    typedef _TYPENAME vector<_TypeT, _Allocator>::allocator_type
-        allocator_type;
-    typedef _TYPENAME vector<_TypeT, _Allocator>::_C_value_alloc_type
-        _C_value_alloc_type;
-    typedef _TYPENAME vector<_TypeT, _Allocator>::size_type size_type;
-    typedef _TYPENAME vector<_TypeT, _Allocator>::iterator  iterator;
-
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
-
     _RWSTD_ASSERT_RANGE (__first, __last);
 
 #ifndef _RWSTD_NO_EXT_VECTOR_ASSIGN_IN_PLACE
@@ -477,8 +445,6 @@
 }
 
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
 template <class _TypeT, class _Allocator>
 template <class _InputIter>
 void vector<_TypeT, _Allocator>::
@@ -487,21 +453,6 @@
 {
     vector* const __self = this;
 
-#else   // if defined (_RWSTD_NO_MEMBER_TEMPLATES)
-
-template <class _TypeT, class _Allocator, class _VectorIter, class _InputIter>
-void
-__rw_insert_range (vector<_TypeT, _Allocator> *__self, _VectorIter __it,
-                   _InputIter __first, _InputIter __last, input_iterator_tag)
-{
-    typedef _TYPENAME vector<_TypeT, _Allocator>::value_type value_type;
-    typedef _TYPENAME vector<_TypeT, _Allocator>::allocator_type
-        allocator_type;
-    typedef _TYPENAME vector<_TypeT, _Allocator>::size_type size_type;
-    typedef _TYPENAME vector<_TypeT, _Allocator>::pointer   pointer;
-
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
-
     _RWSTD_ASSERT_RANGE (__it, end ());
     _RWSTD_ASSERT_RANGE (__first, __last);
 
@@ -578,8 +529,6 @@
 }
 
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
 template <class _TypeT, class _Allocator>
 template <class _FwdIter>
 void vector<_TypeT, _Allocator>::
@@ -588,25 +537,6 @@
 {
     vector* const __self = this;
 
-#else   // if defined (_RWSTD_NO_MEMBER_TEMPLATES)
-
-template <class _TypeT, class _Allocator, class _VectorIter, class _FwdIter>
-void
-__rw_insert_range (vector<_TypeT, _Allocator> *__self,  _VectorIter __it,
-                   _FwdIter __first, _FwdIter __last,
-                   forward_iterator_tag)
-{
-    typedef _TYPENAME vector<_TypeT, _Allocator>::value_type value_type;
-    typedef _TYPENAME vector<_TypeT, _Allocator>::allocator_type
-        allocator_type;
-    typedef _TYPENAME vector<_TypeT, _Allocator>::_C_value_alloc_type
-        _C_value_alloc_type;
-    typedef _TYPENAME vector<_TypeT, _Allocator>::size_type size_type;
-    typedef _TYPENAME vector<_TypeT, _Allocator>::pointer pointer;
-    typedef _TYPENAME vector<_TypeT, _Allocator>::iterator iterator;
-
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
-
     _RWSTD_ASSERT_RANGE (__it, end ());
     _RWSTD_ASSERT_RANGE (__first, __last);
 
@@ -732,7 +662,6 @@
 
 #ifndef _RWSTD_NO_BOOL
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
 // The body of this function is duplicated in src/vecbool.cpp and
 // further down in this file as well.
 #if !defined (_RWSTD_NO_CLASS_PARTIAL_SPEC) 
@@ -768,7 +697,6 @@
       _C_begin = iterator(__q, 0);
     }
   }
-#endif // _RWSTD_NO_MEMBER_TEMPLATES
 
 #ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC
 
@@ -850,35 +778,6 @@
   }
 
 
-#ifdef _RWSTD_NO_MEMBER_TEMPLATES
-  template <class _Allocator>
-  void vector<bool,_Allocator >::insert (iterator       __it,
-                                         const_iterator __first,
-                                         const_iterator __last)
-  {
-    if (__first == __last) return;
-    size_type __n = _DISTANCE(__first, __last, size_type);
-    if (capacity() - size() >= __n)
-    {
-      _C_copy_backward(__it, end(), _C_end + __n);
-      _C_copy(__first, __last, __it);
-      _C_end += __n;
-    }
-    else
-    {
-      size_type __len = size() + (max)(size(), __n);
-      unsigned int* __q = _C_bit_alloc(__len);
-      iterator __i = _C_copy(begin(), __it, iterator(__q, 0));
-      __i = _C_copy(__first, __last, __i);
-      _C_end = _C_copy(__it, end(), __i);
-      _C_value_alloc_type (*this).
-          deallocate((pointer)_C_begin._C_p,_C_bufend - _C_begin._C_p);
-      _C_bufend = __q + (__len + _RWSTD_WORD_BIT - 1)/_RWSTD_WORD_BIT;
-      _C_begin = iterator(__q, 0);
-    }
-  }
-#endif // _RWSTD_NO_MEMBER_TEMPLATES
-
   template <class _Allocator>
   void vector<bool,_Allocator >::resize (size_type __new_size, bool __c)
   {
diff --git a/src/collate.cpp b/src/collate.cpp
index 6aa306f..dc5013d 100644
--- a/src/collate.cpp
+++ b/src/collate.cpp
@@ -254,7 +254,7 @@
                     // non-ignore value will collate first
 
                     if (*weightp == 0) {
-                        typedef _TYPENAME _STR_T::value_type CharT;
+                        typedef typename _STR_T::value_type CharT;
 
                         const CharT ign =
                             _STD::numeric_limits<CharT>::max ();
@@ -276,7 +276,7 @@
                     weightp = weightp + 1 + pass * impl->longest_weight;
                     // non-ignore value will collate first
                     if (*weightp == 0) {
-                        typedef _TYPENAME _STR_T::value_type CharT;
+                        typedef typename _STR_T::value_type CharT;
 
                         const CharT ign =
                             _STD::numeric_limits<CharT>::max ();
@@ -292,7 +292,7 @@
             }
 
             // append a 1 to designate the end of the pass
-            typedef _TYPENAME _STR_T::value_type CharT;
+            typedef typename _STR_T::value_type CharT;
             out += CharT (1);
 
             cur_start = cur_end;
diff --git a/src/podarray.h b/src/podarray.h
index f164a8c..7ab30a9 100644
--- a/src/podarray.h
+++ b/src/podarray.h
@@ -89,7 +89,7 @@
         *_C_pbuf = _TypeT ();
     }
 
-    _EXPLICIT __rw_pod_array (const _TypeT *__a)
+    explicit __rw_pod_array (const _TypeT *__a)
         : _C_len (_C_length (__a))
         // , _C_pbuf (_C_len < _Size ? _C_buffer : new _TypeT [_C_len + 1])
         {
diff --git a/src/vecbool.cpp b/src/vecbool.cpp
index 9b36a02..e655c89 100644
--- a/src/vecbool.cpp
+++ b/src/vecbool.cpp
@@ -124,36 +124,6 @@
 }
 
 
-#  ifdef _RWSTD_NO_MEMBER_TEMPLATES
-
-// The body of this function is duplicated in include/vector.cc
-void vector<bool, allocator<bool> >::
-insert (iterator pos, const_iterator __first, const_iterator __last)
-{
-    if (__first == __last)
-        return;
-
-    size_type __n = _DISTANCE (__first, __last, size_type);
-    if (capacity() - size() >= __n) {
-        _C_copy_backward(pos, end(), _C_end + __n);
-        _C_copy(__first, __last, pos);
-        _C_end += __n;
-    }
-    else {
-        size_type __len = size() + max(size(), __n);
-        unsigned int* __q = _C_bit_alloc(__len);
-        iterator __i = _C_copy(begin(), pos, iterator(__q, 0));
-        __i = _C_copy(__first, __last, __i);
-        _C_end = _C_copy(pos, end(), __i);
-        _C_value_alloc_type (*this).
-            deallocate(_C_begin._C_p,_C_bufend-_C_begin._C_p);
-        _C_bufend = __q + (__len + _RWSTD_WORD_BIT - 1)/_RWSTD_WORD_BIT;
-        _C_begin = iterator(__q, 0);
-    }
-}
-
-#  endif   // _RWSTD_NO_MEMBER_TEMPLATES
-
 void vector<bool, allocator<bool> >::
 resize (size_type __new_size, bool __c)
 {
diff --git a/tests/containers/23.bitset.cpp b/tests/containers/23.bitset.cpp
index ec09d57..d0a55b2 100644
--- a/tests/containers/23.bitset.cpp
+++ b/tests/containers/23.bitset.cpp
@@ -22,7 +22,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 2001-2006 Rogue Wave Software.
+ * Copyright 2001-2008 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -65,13 +65,13 @@
         bits_ [N] = '\0';   // null-terminate
     }
 
-    _EXPLICIT test_set (unsigned long val) {
+    explicit test_set (unsigned long val) {
         for (std::size_t i = 0; i != N; ++i)
             set (i, !!(val & (1UL << i)));
         bits_ [N] = '\0';   // NUL-terminate
     }
 
-    _EXPLICIT test_set (const std::bitset<N> &rhs) {
+    explicit test_set (const std::bitset<N> &rhs) {
         for (std::size_t i = 0; i != N; ++i)
             set (i, rhs.test (i));
         bits_ [N] = '\0';   // NUL-terminate
@@ -187,8 +187,6 @@
 
 /**************************************************************************/
 
-#ifndef _RWSTD_NO_EXPLICIT
-
 // helper to verify that bitset ctor is explicit
 // not defined since it must not be referenced if test is successful
 // static commented out to prevent gcc warning: function declared
@@ -206,8 +204,6 @@
 static void
 is_explicit (const has_implicit_ctor&) { }
 
-#endif   // _RWSTD_NO_EXPLICIT
-
 
 static void
 test_synopsis (std::bitset<0>*)
@@ -239,15 +235,14 @@
     MEMFUN (Reference&, flip, ());
 
     // 23.3.5.1 - verify bitset ctors
-#if    !defined (_RWSTD_NO_EXPLICIT) \
-    && (!defined (__SUNPRO_CC) || __SUNPRO_CC > 0x530) \
+#if    (!defined (__SUNPRO_CC) || __SUNPRO_CC > 0x530) \
     && (!defined (__GNUG__) || __GNUG__ >= 3)
     // working around a SunPro 5.2 bug (see PR #25959)
 
     // verify that bitset ctor is declared explicit
     is_explicit (std::string ());
 
-#endif   // _RWSTD_NO_EXPLICIT && SunPro > 5.3
+#endif   // SunPro > 5.3
 
     // verify default arguments
     (void)Bitset (std::string ());
@@ -283,13 +278,12 @@
 
     MEMFUN (unsigned long, to_ulong, () const);
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-#  if !defined (__HP_aCC) || __HP_aCC >= 60000
+#if !defined (__HP_aCC) || __HP_aCC >= 60000
 
      // working around HP aCC bugs PR #23312 and bug #503
 
-#    define PARAMLIST_3(T)   T, std::char_traits<T>, std::allocator<T>
-#    define PARAMLIST_2(T)   T, std::char_traits<T>
+#  define PARAMLIST_3(T)   T, std::char_traits<T>, std::allocator<T>
+#  define PARAMLIST_2(T)   T, std::char_traits<T>
 
     // exercise the overloaded member template function and ordinary
     // member function to_string()
@@ -298,21 +292,20 @@
     MEMFUN (std::basic_string<PARAMLIST_3 (char) >,
             to_string, (char, char) const);
 
-#    ifndef _RWSTD_NO_WCHAR_T
+#  ifndef _RWSTD_NO_WCHAR_T
 
     MEMFUN (std::basic_string<PARAMLIST_3 (wchar_t) >,
             to_string<PARAMLIST_3 (wchar_t) >, (wchar_t, wchar_t) const);
 
-#    endif   // _RWSTD_NO_WCHAR_T
+#  endif   // _RWSTD_NO_WCHAR_T
 
     MEMFUN (std::basic_string<PARAMLIST_3 (int) >,
             to_string<PARAMLIST_3 (int) >, (int, int) const);
 
-#    undef PARAMLIST_3
-#    undef PARAMLIST_2
+#  undef PARAMLIST_3
+#  undef PARAMLIST_2
 
-#  endif   // !__HP_aCC || __HP_aCC >= 60000
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
+#endif   // !__HP_aCC || __HP_aCC >= 60000
 
     MEMFUN (std::size_t, size, () const);
     MEMFUN (std::size_t, count, () const);
@@ -353,17 +346,16 @@
     FUN (std::basic_ostream< PARAMLIST (char) >&, std::operator<<,
          (std::basic_ostream< PARAMLIST (char) >&, const Bitset&));
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-#  ifndef _RWSTD_NO_WCHAR_T
+#ifndef _RWSTD_NO_WCHAR_T
 
     FUN (std::basic_istream< PARAMLIST (wchar_t) >&, std::operator>>,
          (std::basic_istream< PARAMLIST (wchar_t) >&, Bitset&));
     FUN (std::basic_ostream< PARAMLIST (wchar_t) >&, std::operator<<,
          (std::basic_ostream< PARAMLIST (wchar_t) >&, const Bitset&));
 
-#  endif   // _RWSTD_NO_WCHAR_T
+#endif   // _RWSTD_NO_WCHAR_T
 
-#  if !defined (_MSC_VER) || _MSC_VER > 1300
+#if !defined (_MSC_VER) || _MSC_VER > 1300
 
     // MSVC is too dumb to handle bitset inserters and extractors
     // parametrized on multiple template paramenters
@@ -372,8 +364,7 @@
     FUN (std::basic_ostream< PARAMLIST (int) >&, std::operator<<,
          (std::basic_ostream< PARAMLIST (int) >&, const Bitset&));
 
-#  endif   // !defined (_MSC_VER) || _MSC_VER > 1300
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
+#endif   // !defined (_MSC_VER) || _MSC_VER > 1300
 
 #undef PARAMLIST
 
@@ -724,7 +715,7 @@
                        N, _j, test_set<N>(b).bits ());
 
             // exercise std::bitset<N>::reference
-            _TYPENAME std::bitset<N>::reference r = b [_j];
+            typename std::bitset<N>::reference r = b [_j];
 
             // std::bitset<N>::reference::flip()
             r.flip ();
@@ -844,8 +835,6 @@
 }
 
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
 // call the bitset<N>::to_string() member function template,
 // explicitly specifying all three template arguments,
 // and 2, 1, or 0 of the two default function arguments
@@ -972,8 +961,6 @@
     return bs.template to_string<UserChar>(zero, one);
 }
 
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
-
 
 // call the bitset<N>::to_string() ordinary member function,
 // explicitly specifying none of the three template arguments,
@@ -1061,8 +1048,6 @@
 
     int pos;
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
     ////////////////////////////////////////////////////////////////////////
     // exercise the overload of the to_string() member function template
     // that takes all three template parameters different from char,
@@ -1217,8 +1202,6 @@
                to_string (ts.bits (), "ox").c_str (),
                TO_STR (str1), pos);
 
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
-
 
     ////////////////////////////////////////////////////////////////////////
     // exercise the non-template overload of the to_string() member
diff --git a/tests/containers/23.deque.modifiers.cpp b/tests/containers/23.deque.modifiers.cpp
index aa178e7..4b121f4 100644
--- a/tests/containers/23.deque.modifiers.cpp
+++ b/tests/containers/23.deque.modifiers.cpp
@@ -22,7 +22,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2008 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -1248,8 +1248,7 @@
 
 /**************************************************************************/
 
-#ifndef _RWSTD_NO_EXPLICIT
-#  if !defined (_MSC_VER) || _MSC_VER > 1200
+#if !defined (_MSC_VER) || _MSC_VER > 1200
 
 struct DR_438
 {
@@ -1264,13 +1263,10 @@
 
 bool DR_438::cast_used;
 
-#  else   // if MSVC <= 6.0
-       // avoid an MSVC 6.0 ICE on this code
-#    define NO_DR_438_TEST "this version of MSVC is too broken"
-#  endif   // !MSVC || MSVC > 6.0
-#else
-#  define NO_DR_438_TEST "_RWSTD_NO_EXPLICIT #defined"
-#endif   // _RWSTD_NO_EXPLICIT
+#else   // if MSVC <= 6.0
+     // avoid an MSVC 6.0 ICE on this code
+#  define NO_DR_438_TEST "this version of MSVC is too broken"
+#endif   // !MSVC || MSVC > 6.0
 
 
 void test_dr_438 ()
diff --git a/tests/diagnostics/19.std.exceptions.cpp b/tests/diagnostics/19.std.exceptions.cpp
index 53ba61b..fcfaf87 100644
--- a/tests/diagnostics/19.std.exceptions.cpp
+++ b/tests/diagnostics/19.std.exceptions.cpp
@@ -157,8 +157,6 @@
 
     _RWSTD_UNUSED (e);
 
-#ifndef _RWSTD_NO_EXPLICIT
-
     // verify that each exceptions converting ctor is explicit
     // use a pointer since std::string need not be a complete class
     const char s[40] = "";
@@ -169,8 +167,6 @@
     // (if one exists) is also explicit
     is_explicit (s);
 
-#endif   // _RWSTD_NO_EXPLICIT
-
     return result;
 }
 
diff --git a/tests/include/rw_testdefs.h b/tests/include/rw_testdefs.h
index 56c0634..35a7c9f 100644
--- a/tests/include/rw_testdefs.h
+++ b/tests/include/rw_testdefs.h
@@ -62,11 +62,6 @@
 #endif   // _RWSTD_NO_NAMESPACE && !std
 
 
-#if defined (_RWSTD_NO_TYPENAME) && !defined (typename)
-#  define typename /* ignore */
-#endif   // _RWSTD_NO_TYPENAME && !typename
-
-
 #if defined (_RWSTD_NO_EXCEPTIONS)
 #  ifndef try
 #    define try   if (0); else
@@ -173,4 +168,9 @@
 #  pragma warning (disable: 279)
 #endif   // Intel C++ 10.0 and prior
 
+#if    ((4 < __GNUC__) || ((4 == __GNUC__) && (3 < __GNUC_MINOR__))) \
+    || (310 < __EDG_VERSION__)
+#  define _RWSTD_TT_STRICT_CXX_0X_CONFORM
+#endif
+
 #endif   // RW_TESTDEFS_H_INCLUDED
diff --git a/tests/intro/17.names.cpp b/tests/intro/17.names.cpp
index 39e24cb..ae55258 100644
--- a/tests/intro/17.names.cpp
+++ b/tests/intro/17.names.cpp
@@ -554,7 +554,12 @@
 #define Tp                      !ERROR!
 #define traits                  !ERROR!
 #define Traits                  !ERROR!
-#define type                    !ERROR!
+
+#ifdef _RWSTD_NO_EXT_CXX_0X
+// required member of reference_wrapper
+#  define type                    !ERROR!
+#endif
+
 #define Type                    !ERROR!
 #define UCHAR                   !ERROR!
 #define UINT                    !ERROR!
diff --git a/tests/localization/22.locale.synopsis.cpp b/tests/localization/22.locale.synopsis.cpp
index c005d31..06894f0 100644
--- a/tests/localization/22.locale.synopsis.cpp
+++ b/tests/localization/22.locale.synopsis.cpp
@@ -22,7 +22,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 1994-2008 Rogue Wave Software.
+ * Copyright 1994-2008 Rogue Wave Software, Inc.
  *
  **************************************************************************/
 
@@ -391,8 +391,6 @@
 
 /***************************************************************************/
 
-#ifndef _RWSTD_NO_EXPLICIT
-
 // helper to verify that locale and facet ctors are explicit
 // not defined since they must not be referenced if test is successful
 void is_explicit (const std::locale&);
@@ -425,8 +423,6 @@
 // calls to the overloaded is_explicit() resolve to the function below
 void is_explicit (const has_implicit_ctor&) { /* empty */ }
 
-#endif   // _RWSTD_NO_EXPLICIT
-
 /***************************************************************************/
 
 // local to test_locale
@@ -446,13 +442,9 @@
 
     static std::locale::id id;
 
-#ifdef _RWSTD_NO_MEMBER_TEMPLATES
-
     virtual std::locale::id& _C_get_id () const {
         return id;
     }
-
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
 };
 
 
@@ -575,14 +567,12 @@
             ~Facet () {
                 is_dtor_virtual = true;
             }
-#ifdef _RWSTD_NO_MEMBER_TEMPLATES
 
             virtual std::locale::id& _C_get_id () const {
                 static std::locale::id id;
                 return id;
             }
 
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
         };
 
         // delete a derived object using a pointer to the base
@@ -610,8 +600,6 @@
     // 22.1.1.2, p9
     (void)std::locale (l, "", std::locale::all);
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
     Facet *pf = new Facet (1 /* ref count */);
 
     {
@@ -650,8 +638,6 @@
 
     pf = 0;
 
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
-
     // 22.1.1.2, p14
     (void)std::locale (l, l, std::locale::all);
 
@@ -674,18 +660,14 @@
 
 #endif   // __HP_aCC > 33000
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
-#  if !defined __HP_aCC || __HP_aCC > 33100
+#if !defined __HP_aCC || __HP_aCC > 33100
 
     // working around an HP aCC bug (see PR #23312)
 
     // 22.1.1.3, p1
     MEMFUN (std::locale, combine<Facet>, (const std::locale&) const);
 
-#  endif   // __HP_aCC > 33000
-
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
+#endif   // __HP_aCC > 33000
 
     // 22.1.1.3, p5
     MEMFUN (std::string, name, () const);
@@ -705,15 +687,11 @@
 
 #endif   // _RWSTD_NO_WCHAR_T
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
     // exercise a specialization other than on the default char types
     typedef StringTypes<int>::string_type IntString;
 
     MEMFUN (bool, operator(), (const IntString&, const IntString&) const);
 
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
-
     // 22.1.1.5
     FUN (std::locale, std::locale::global, (const std::locale&));
     FUN (const std::locale&, std::locale::classic, ());
@@ -1075,7 +1053,7 @@
     // working around an MSVC 6.0 bug
     typedef locale::facet           Base;
 
-    _EXPLICIT numpunct (size_t refs = 0)
+    explicit numpunct (size_t refs = 0)
         : Base (refs) { /* empty */ }
 
     static locale::id id;
@@ -1558,7 +1536,7 @@
     // working around an MSVC 6.0 bug
     typedef locale::facet           Base;
 
-    _EXPLICIT moneypunct (size_t refs = 0)
+    explicit moneypunct (size_t refs = 0)
         : Base (refs), money_base () { /* empty */ }
 
     static locale::id id;
@@ -1588,7 +1566,7 @@
     // working around an MSVC 6.0 bug
     typedef locale::facet           Base;
 
-    _EXPLICIT moneypunct (size_t refs = 0)
+    explicit moneypunct (size_t refs = 0)
         : Base (refs), money_base () { /* empty */ }
 
     static locale::id id;
diff --git a/etc/config/src/EXPLICIT.cpp b/tests/regress/27.streambuf.buffer.stdcxx-808.cpp
similarity index 60%
rename from etc/config/src/EXPLICIT.cpp
rename to tests/regress/27.streambuf.buffer.stdcxx-808.cpp
index a9a2d32..cc69b7c 100644
--- a/etc/config/src/EXPLICIT.cpp
+++ b/tests/regress/27.streambuf.buffer.stdcxx-808.cpp
@@ -1,12 +1,18 @@
-// checking explicit keyword
-
-/***************************************************************************
+/***********************************************************************
+ *
+ * 27.streambuf.buffer.stdcxx-808.cpp - regression test for STDCXX-808
+ *
+ * http://issues.apache.org/jira/browse/STDCXX-808
+ *
+ * $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
+ * 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
  *
@@ -18,13 +24,19 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 1999-2007 Rogue Wave Software, Inc.
- * 
- **************************************************************************/
+ * Copyright 2008 Rogue Wave Software, Inc.
+ *
+ **********************************************************************/
 
-struct S
+#include <cassert>
+#include <iosfwd>
+#include <strstream>
+
+int main ()
 {
-    S (double) { }
+    std::strstreambuf sb;
+    std::streampos pos = sb.pubseekoff (10, std::ios::beg, std::ios::in);
+    assert (-1 == pos);
+    return 0;
+}
 
-    explicit S (int) { }
-};
diff --git a/tests/src/thread.cpp b/tests/src/thread.cpp
index 6fd5cc4..02d3d1b 100644
--- a/tests/src/thread.cpp
+++ b/tests/src/thread.cpp
@@ -83,6 +83,14 @@
 
 
 #if defined (_RWSTD_POSIX_THREADS)
+
+#  ifdef _RWSTD_EDG_ECCP
+     // disable error #450-D: the type "long long" is nonstandard
+     // issued for uses of the type in Linux system headers (e.g.,
+     // pthreadtypes.h)
+#    pragma diag_suppress 450
+#  endif   // vanilla EDG eccp demo
+
 #  include <pthread.h>
 
 _TEST_EXPORT int
diff --git a/tests/strings/21.string.exceptions.cpp b/tests/strings/21.string.exceptions.cpp
index f02cb25..b017ead 100644
--- a/tests/strings/21.string.exceptions.cpp
+++ b/tests/strings/21.string.exceptions.cpp
@@ -308,8 +308,6 @@
 static void
 test_len_ctor ()
 {
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
     rw_info (0, __FILE__, __LINE__, "21.3.1, p15");
 
     int thrown = 0;
@@ -326,8 +324,6 @@
     rw_assert (1 == thrown, __FILE__, __LINE__,
                "string::string (InputIterator, InputIterator)"
                "failed to use __rw::__rw_throw()");
-
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
 }
 
 /**************************************************************************/
diff --git a/tests/utilities/20.auto.ptr.cpp b/tests/utilities/20.auto.ptr.cpp
index b121a61..495ee2e 100644
--- a/tests/utilities/20.auto.ptr.cpp
+++ b/tests/utilities/20.auto.ptr.cpp
@@ -157,7 +157,7 @@
 
     // exercise 20.4.5, p2 - auto_ptr<> interface
 
-    typedef _TYPENAME std::auto_ptr<T>::element_type element_type;
+    typedef typename std::auto_ptr<T>::element_type element_type;
 
     // verify that element_type is the same as T
     element_type *elem = (T*)0;
@@ -192,13 +192,12 @@
     FUN (T*, T, release, () _PTR_THROWS (()));
     FUN (void, T, reset, (T*) _PTR_THROWS (()));
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
 
-#  if !defined(__GNUG__) || __GNUG__ > 3 || __GNUG__ == 3 && __GNUC_MINOR__ > 2
+#if !defined(__GNUG__) || __GNUG__ > 3 || __GNUG__ == 3 && __GNUC_MINOR__ > 2
 
      // g++ 2.95.2 and HP aCC can't take the address of a template member
 
-#    if !defined (__HP_aCC) || _RWSTD_HP_aCC_MAJOR > 5
+#  if !defined (__HP_aCC) || _RWSTD_HP_aCC_MAJOR > 5
 
     // SunPro incorrectly warns here (see PR #27276)
     FUN (std::auto_ptr<Base>&, Base,
@@ -206,24 +205,22 @@
 
        // SunPro 5.4 can't decide between a ctor template
        // and a conversion operator (see PR #24476)
-#      if !defined (__SUNPRO_CC) || __SUNPRO_CC > 0x540
+#    if !defined (__SUNPRO_CC) || __SUNPRO_CC > 0x540
 
-#        if !defined (_RWSTD_MSVC) || _RWSTD_MSVC > 1310
+#      if !defined (_RWSTD_MSVC) || _RWSTD_MSVC > 1310
     FUN (std::auto_ptr_ref<Base>, Derived,
          operator std::auto_ptr_ref<Base>, () _PTR_THROWS (()));
 
     FUN (std::auto_ptr<Base>, Derived,
          operator std::auto_ptr<Base>, () _PTR_THROWS (()));
 
-#        endif   // MSVC > 7.1
+#      endif   // MSVC > 7.1
 
-#      endif   // SunPro > 5.4
+#    endif   // SunPro > 5.4
 
-#    endif   // HP aCC > 5
+#  endif   // HP aCC > 5
 
-#  endif   // gcc > 3.2
-
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
+#endif   // gcc > 3.2
 
     rw_info (0, 0, 0, "[lib.auto.ptr.cons]");
 
@@ -291,23 +288,19 @@
     ap1 = ap1;
     ap1.operator= (ap1);
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
-#  if !defined (__HP_aCC) || 6 <=  _RWSTD_HP_aCC_MAJOR
+#if !defined (__HP_aCC) || 6 <=  _RWSTD_HP_aCC_MAJOR
 
     // working around an HP aCC 3 and 5 bug (STDCXX-655)
 
     ap1.operator=<void>(ap1);
 
-#  endif   // !HP aCC or HP aCC 6 and better
+#endif   // !HP aCC or HP aCC 6 and better
 
     std::auto_ptr<int> ap4;
     ap1 = ap4;
     ap1.operator= (ap4);
     ap1.operator=<int>(ap4);
 
-#endif // _RWSTD_NO_MEMBER_TEMPLATES
-
     // operator*() cannot be instantiated
 
     void* pv;
@@ -319,9 +312,7 @@
     ap1.reset ();
     ap1.reset (pv);
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
-#  if !defined (__HP_aCC) || 6 <=  _RWSTD_HP_aCC_MAJOR
+#if !defined (__HP_aCC) || 6 <=  _RWSTD_HP_aCC_MAJOR
 
     // working around an HP aCC 3 and 5 bug (STDCXX-656)
 
@@ -331,15 +322,11 @@
     _RWSTD_UNUSED (ar);
     _RWSTD_UNUSED (ap5);
 
-#  endif   // !HP aCC or HP aCC 6 and better
-#endif // _RWSTD_NO_MEMBER_TEMPLATES
-
+#endif   // !HP aCC or HP aCC 6 and better
 }
 
 /**************************************************************************/
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
 // exercise 20.4.5.4
 static std::auto_ptr<Derived>
 test_auto_ptr_conversions ()
@@ -422,7 +409,6 @@
     }
 }
 
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
 
 /**************************************************************************/
 
@@ -444,8 +430,6 @@
     test_auto_ptr ((double*)0, "double");
     test_auto_ptr ((void**)0, "void*");
 
-#ifndef _RWSTD_NO_MEMBER_TEMPLATES
-
     int count = Base::cnt_;
 
     // exercise 20.4.5.4
@@ -458,8 +442,6 @@
     rw_assert (count == Base::cnt_, 0, __LINE__,
                "autoptr leaked %d objects", Base::cnt_ - count);
 
-#endif   // _RWSTD_NO_MEMBER_TEMPLATES
-
     if (!rw_enabled ("void"))
         rw_note (0, 0, 0, "auto_ptr<void> test disabled");
     else
diff --git a/tests/utilities/20.forward.cpp b/tests/utilities/20.forward.cpp
index dded320..d648d47 100644
--- a/tests/utilities/20.forward.cpp
+++ b/tests/utilities/20.forward.cpp
@@ -2,7 +2,7 @@
  *
  * 20.forward.cpp - tests exercising move/forward helpers
  *
- * $Id$
+ * $Id: 20.forward.cpp 673865 2008-07-03 23:26:24Z vitek $
  *
  ***************************************************************************
  *
@@ -22,15 +22,20 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 1994-2008 Rogue Wave Software.
+ * Copyright 2008 Rogue Wave Software.
  * 
  **************************************************************************/
 
+#include <rw_driver.h>
+#include <rw/_defs.h>
+
+// compile out all test code if extensions disabled
+#ifndef _RWSTD_NO_EXT_CXX_0X
+
 #include <rw/_forward.h>
 #include <rw/_meta_rel.h>
 #include <rw/_static_assert.h>
 
-#include <rw_driver.h>
 
 
 struct Foo
@@ -38,20 +43,19 @@
    Foo (int& ) { }
 };
 
-// compile tests
-
-typedef std::identity<Foo> FooIdent;
-typedef std::identity<Foo>::type FooIdentType;
-
-_RWSTD_STATIC_ASSERT ((_RW::__rw_is_same<Foo, FooIdentType>::value),
-                      "(is_same<Foo, FooIdentType>), got false, "
-                      "expected true");
 
 static void
 test_identity ()
 {
     rw_info (0, __FILE__, __LINE__, "std::identity<T> class template");
 
+    typedef std::identity<Foo> FooIdent;
+    typedef std::identity<Foo>::type FooIdentType;
+
+    _RWSTD_STATIC_ASSERT ((_RW::__rw_is_same<Foo, FooIdentType>::value),
+                          "is_same<Foo, FooIdentType>::value is false, "
+                          "expected true");
+
     int i = 1;
     FooIdent foo_ident;
     Foo foo = foo_ident (i);
@@ -60,6 +64,8 @@
 
 /**************************************************************************/
 
+#ifndef _RWSTD_NO_RVALUE_REFERENCES
+
 // using example from standard as a test case
 
 template <class Type>
@@ -76,7 +82,9 @@
 shared_ptr<Type> factory (AType&& at)
 {
     return shared_ptr<Type> (new Type (std::forward<AType> (at)));
-};
+}
+
+/**************************************************************************/
 
 static void
 test_forward ()
@@ -94,21 +102,23 @@
 
 }
 
+#endif // _RWSTD_NO_RVALUE_REFERENCES
+
 /**************************************************************************/
 
 static int
 run_test (int /*unused*/, char* /*unused*/ [])
 {
+    test_identity ();
 
 #if !defined _RWSTD_NO_RVALUE_REFERENCES
 
-    test_identity ();
     test_forward ();
     test_move ();
 
 #else // no rvalue references
 
-    rw_info (true, __FILE__, __LINE__,
+    rw_warn (0, 0, __LINE__,
              "No compiler support for rvalue references; tests disabled.");
 
 #endif   // !defined _RWSTD_NO_RVALUE_REFERENCES
@@ -116,6 +126,17 @@
     return 0;
 }
 
+#else // !_RWSTD_NO_EXT_CXX_0X
+
+static int run_test (int, char*[])
+{
+    rw_warn (0, 0, __LINE__,
+             "test disabled because _RWSTD_NO_EXT_CXX_0X is defined");
+    return 0;
+}
+
+#endif // !_RWSTD_NO_EXT_CXX_0X
+
 /*extern*/ int
 main (int argc, char* argv [])
 {
diff --git a/tests/utilities/20.function.objects.cpp b/tests/utilities/20.function.objects.cpp
index 85a5c3d..334fa38 100644
--- a/tests/utilities/20.function.objects.cpp
+++ b/tests/utilities/20.function.objects.cpp
@@ -401,14 +401,10 @@
 {
     rw_info (0, 0, __LINE__, "[lib.negators]");
 
-#ifndef _RWSTD_NO_EXPLICIT
-
     // verify that std::unary_negate<>() and std::binary_negate<>()
     // ctors are declared explicit
     is_explicit (std::logical_not<int>());
 
-#endif   // _RWSTD_NO_EXPLICIT
-
 // use std::negate<> as an argument in negator ctors
 #undef CTOR_ARG_LIST
 #define CTOR_ARG_LIST \
@@ -549,14 +545,10 @@
 {
     rw_info (0, 0, __LINE__, "[lib.function.pointer.adaptors]");
 
-#ifndef _RWSTD_NO_EXPLICIT
-
     // verify that the pointer to function adapters' ctors are explicit
     is_explicit ((int (*)(int))0);
     is_explicit ((int (*)(int, int))0);
 
-#endif   // _RWSTD_NO_EXPLICIT
-
 // initialize pointer_to_unary_function with the address of square
 #undef CTOR_ARG_LIST
 #define CTOR_ARG_LIST (&::square)
@@ -641,16 +633,12 @@
 {
     rw_info (0, 0, __LINE__, "[lib.member.pointer.adaptors]");
 
-#ifndef _RWSTD_NO_EXPLICIT
-
     // verify that the pointer to member adapters' ctors are explicit
     is_explicit ((int (Integer::*)())0);
     is_explicit ((int (Integer::*)(short))0);
     is_explicit ((int (Integer::*)() const)0);
     is_explicit ((int (Integer::*)(short) const)0);
 
-#endif   // _RWSTD_NO_EXPLICIT
-
 #undef CTOR_ARG_LIST
 #define CTOR_ARG_LIST (&Integer::square)
 
diff --git a/tests/utilities/20.meta.help.cpp b/tests/utilities/20.meta.help.cpp
index 8ff9703..e18cac3 100644
--- a/tests/utilities/20.meta.help.cpp
+++ b/tests/utilities/20.meta.help.cpp
@@ -28,6 +28,7 @@
  **************************************************************************/
 
 #include <rw_driver.h>
+#include <rw/_defs.h>
 
 // compile out all test code if extensions disabled
 #ifndef _RWSTD_NO_EXT_CXX_0X
@@ -107,7 +108,7 @@
 
     // verify that the type typedef is correct
     const bool e =
-        test_is_same<_TYPENAME integral_constant_type::type,
+        test_is_same<typename integral_constant_type::type,
                      integral_constant_type>::value;
     rw_assert (e, 0, __LINE__,
                "integral_constant<%s, %s>::type is%{?}n't%{;} "
@@ -125,7 +126,7 @@
 
     // verify the type of the type typedef
     const bool a =
-        test_is_same<_TYPENAME integral_constant_type::value_type, bool>::value;
+        test_is_same<typename integral_constant_type::value_type, bool>::value;
     rw_assert (a, 0, __LINE__,
                "%s::value_type is%{?}n't%{;} same as bool",
                name, !a);
@@ -144,7 +145,7 @@
                "%s is%{?}n't%{;} of type integral_constant<bool, %s>",
                name, !c, value);
 
-    test_integral_constant<_TYPENAME integral_constant_type::value_type,
+    test_integral_constant<typename integral_constant_type::value_type,
                            Value>("bool", value);
 }
 
diff --git a/tests/utilities/20.meta.rel.cpp b/tests/utilities/20.meta.rel.cpp
index 1856e88..b5bb53c 100644
--- a/tests/utilities/20.meta.rel.cpp
+++ b/tests/utilities/20.meta.rel.cpp
@@ -30,6 +30,7 @@
 #include <type_traits>
 
 #include <rw_driver.h>
+#include <rw/_defs.h>
 
 // compile out all test code if extensions disabled
 #ifndef _RWSTD_NO_EXT_CXX_0X
@@ -66,27 +67,27 @@
 };
 
 template <class T>
-struct derived_ : T
+struct derived_t : T
 {
 };
 
 template <class T>
-struct derived_private_ : private T
+struct derived_private_t : private T
 {
 };
 
 template <class T>
-struct derived_protected_ : protected T
+struct derived_protected_t : protected T
 {
 };
 
 template <class T>
-struct derived_with_conversion_ : T
+struct derived_with_conversion_t : T
 {
-    derived_with_conversion_ (const T&);
+    derived_with_conversion_t (const T&);
 };
 
-class incomplete_;
+class incomplete_t;
 
 union union_C {
     int i_; float f_;
@@ -107,8 +108,9 @@
 }
 
 #define TEST(Trait,TypeT,TypeU,Expect)                              \
-    test_trait (__LINE__, Trait<TypeT,TypeU>::value, Expect,        \
-                #Trait, #TypeT, #TypeU)
+    { const bool value = Trait< TypeT, TypeU >::value;              \
+      test_trait (__LINE__, value, Expect, #Trait, #TypeT, #TypeU); \
+    } typedef void __dummy
 
 static void test_is_same ()
 {
@@ -122,14 +124,16 @@
     
     TEST (std::is_same, enum_A, enum_A, true);
     TEST (std::is_same, enum_B, enum_B, true);
-    
+   
     TEST (std::is_same, struct_A, struct_A, true);
-    TEST (std::is_same, derived_<struct_A>,
-                         derived_<struct_A>, true);
+
+    typedef derived_t<struct_A> derived_A;
+    TEST (std::is_same, derived_A, derived_A, true);
 
     TEST (std::is_same, class_B, class_B, true);
-    TEST (std::is_same, derived_<class_B>,
-                         derived_<class_B>, true);
+
+    typedef derived_t<class_B> derived_B;
+    TEST (std::is_same, derived_B, derived_B, true);
 
     // other combinations should fail
     TEST (std::is_same, signed char, char, false);
@@ -156,13 +160,18 @@
     TEST (std::is_same, enum_A, unsigned int, false);
     TEST (std::is_same, enum_A, unsigned long, false);
 
-    TEST (std::is_same, struct_A, derived_<struct_A>, false);
-    TEST (std::is_same, class_B, derived_<class_B>, false);
+    TEST (std::is_same, struct_A, derived_t<struct_A>, false);
+    TEST (std::is_same, class_B, derived_t<class_B>, false);
 
     TEST (std::is_same, int[], int*, false);
     TEST (std::is_same, int*, int[], false);
 }
 
+#define TEST(Trait,TypeT,TypeU,Expect)                              \
+    { const bool value = Trait< TypeT, TypeU >::value;              \
+      test_trait (__LINE__, value, Expect, #Trait, #TypeT, #TypeU); \
+    } typedef void __dummy
+
 static void test_is_base_of ()
 {
     TEST (std::is_base_of, bool, bool, false);
@@ -177,24 +186,43 @@
     TEST (std::is_base_of, enum_B, enum_B, false);
     
     TEST (std::is_base_of, struct_A, struct_A, true);
-    TEST (std::is_base_of, derived_<struct_A>,
-                            derived_<struct_A>, true);
+    TEST (std::is_base_of, derived_t<struct_A>,
+                           derived_t<struct_A>, true);
 
     TEST (std::is_base_of, class_B, class_B, true);
-    TEST (std::is_base_of, derived_<class_B>,
-                            derived_<class_B>, true);
+    TEST (std::is_base_of, derived_t<class_B>,
+                           derived_t<class_B>, true);
 
+#if    defined (_RWSTD_TT_IS_BASE_OF) \
+    || defined (_RWSTD_TT_IS_CLASS)   \
+    || defined (_RWSTD_TT_IS_UNION)
+    // without one of the above, we can't reliably implement
+    // this trait for union type
     TEST (std::is_base_of, union_C, union_C, false);
+#else
+    rw_warn (0, 0, __LINE__,
+             "portions of test_is_base_of() have been disabled due "
+             "to lack of compiler support.");
+#endif
 
     // public inheritance
-    TEST (std::is_base_of, struct_A, derived_<struct_A>, true);
-    TEST (std::is_base_of, class_B, derived_<class_B>, true);
+    TEST (std::is_base_of, struct_A, derived_t<struct_A>, true);
+    TEST (std::is_base_of, class_B, derived_t<class_B>, true);
 
+#if defined (__SUNPRO_CC) && (__SUNPRO_CC <= 0x590)
+
+    // for some reason the trick used to detect private and protected
+    // inheritance doesn't work on sunpro-5.9
+    rw_warn (0, 0, __LINE__,
+             "unable to detect private or protected base classes.");
+
+#else
     // protected inheritance
-    TEST (std::is_base_of, derived_protected_<struct_A> , struct_A , true);
+    TEST (std::is_base_of, struct_A, derived_protected_t<struct_A>, true);
 
     // private inheritance
-    TEST (std::is_base_of, derived_private_<struct_A> , struct_A , true);
+    TEST (std::is_base_of, struct_A, derived_private_t<struct_A>, true);
+#endif
 
     // other combinations should fail
     TEST (std::is_base_of, signed char, char, false);
@@ -223,17 +251,23 @@
 
     TEST (std::is_base_of, int[], int*, false);
     TEST (std::is_base_of, int*, int[], false);
+
+    TEST (std::is_base_of, struct_A, class_B, false);
+    TEST (std::is_base_of, class_B, struct_A, false);
+
+    TEST (std::is_base_of, derived_t<struct_A>, struct_A, false);
+    TEST (std::is_base_of, derived_t<class_B>, class_B, false);
 }
 
 static void test_is_convertible ()
 {
-    TEST (std::is_convertible, derived_<struct_A> , struct_A , true); // slice
-    TEST (std::is_convertible, derived_<struct_A>*, struct_A*, true);
-    TEST (std::is_convertible, derived_<struct_A>&, struct_A&, true);
+    TEST (std::is_convertible, derived_t<struct_A> , struct_A , true); // slice
+    TEST (std::is_convertible, derived_t<struct_A>*, struct_A*, true);
+    TEST (std::is_convertible, derived_t<struct_A>&, struct_A&, true);
 
-    TEST (std::is_convertible, derived_<class_B> , class_B , true); // slice
-    TEST (std::is_convertible, derived_<class_B>*, class_B*, true);
-    TEST (std::is_convertible, derived_<class_B>&, class_B&, true);
+    TEST (std::is_convertible, derived_t<class_B> , class_B , true); // slice
+    TEST (std::is_convertible, derived_t<class_B>*, class_B*, true);
+    TEST (std::is_convertible, derived_t<class_B>&, class_B&, true);
 
     TEST (std::is_convertible, convertible_to_A, struct_A, true);
     TEST (std::is_convertible, struct_A, convertible_to_A, false);
@@ -312,7 +346,7 @@
 
     //// from an abstract type is allowed
     //TEST (std::is_convertible, abstract_, int, false);
-    //TEST (std::is_convertible, derived_<abstract_>, abstract_, false);
+    //TEST (std::is_convertible, derived_t<abstract_>, abstract_, false);
 
     TEST (std::is_convertible, long*, void*, true);
     TEST (std::is_convertible, void*, long*, false);
@@ -334,7 +368,25 @@
     TEST (std::is_convertible, int*, void*, true);
     TEST (std::is_convertible, int (*)(), void*, false);
 
-    //TEST (std::is_convertible, int (*)(derived_<struct_A>::*), int (*)(struct_A::*), true);
+    TEST (std::is_convertible,
+          int (*)(derived_t<struct_A>*),
+          int (*)(struct_A*), false);
+
+    TEST (std::is_convertible,
+          int (*)(struct_A*),
+          int (*)(derived_t<struct_A>*), false);
+
+    // pointer to derived member convertible to
+    // pointer to base member
+    TEST (std::is_convertible,
+          int derived_t<struct_A>::*,
+          int struct_A::*, false);
+
+    // pointer to base member convertible to
+    // pointer to derived member
+    TEST (std::is_convertible,
+          int struct_A::*,
+          int derived_t<struct_A>::*, true);
 
     TEST (std::is_convertible, int, double, true);
     TEST (std::is_convertible, const int, double, true);
diff --git a/tests/utilities/20.meta.trans.arr.cpp b/tests/utilities/20.meta.trans.arr.cpp
index d527361..18015e5 100644
--- a/tests/utilities/20.meta.trans.arr.cpp
+++ b/tests/utilities/20.meta.trans.arr.cpp
@@ -28,6 +28,7 @@
  **************************************************************************/
 
 #include <rw_driver.h>
+#include <rw/_defs.h>
 
 // compile out all test code if extensions disabled
 #ifndef _RWSTD_NO_EXT_CXX_0X
diff --git a/tests/utilities/20.meta.trans.cv.cpp b/tests/utilities/20.meta.trans.cv.cpp
index 063c852..a12447d 100644
--- a/tests/utilities/20.meta.trans.cv.cpp
+++ b/tests/utilities/20.meta.trans.cv.cpp
@@ -28,6 +28,7 @@
  **************************************************************************/
 
 #include <rw_driver.h>
+#include <rw/_defs.h>
 
 // compile out all test code if extensions disabled
 #ifndef _RWSTD_NO_EXT_CXX_0X
diff --git a/tests/utilities/20.meta.trans.other.cpp b/tests/utilities/20.meta.trans.other.cpp
index 00c2678..c8c905d 100644
--- a/tests/utilities/20.meta.trans.other.cpp
+++ b/tests/utilities/20.meta.trans.other.cpp
@@ -28,14 +28,18 @@
  **************************************************************************/
 
 #include <rw_driver.h>
-#include <rw_printf.h> // for rwsprintfa()
-#include <stdlib.h>    // for free()
+#include <rw/_defs.h>
 
 // compile out all test code if extensions disabled
 #ifndef _RWSTD_NO_EXT_CXX_0X
 
 #include <type_traits>
 
+#include <rw_printf.h> // for rwsprintfa()
+
+#include <stdlib.h>    // for free()
+#include <stddef.h>    // for size_t
+
 /**************************************************************************/
 
 template <class T>
@@ -53,7 +57,7 @@
 // this function should available _only_ if T is char
 template <class T>
 int
-enabled_if_char (_TYPENAME std::enable_if<is_char<T>::val>::type* = 0)
+enabled_if_char (typename std::enable_if<is_char<T>::val>::type* = 0)
 {
     return 1;
 }
@@ -61,7 +65,7 @@
 // this function should be available if T is _not_ char
 template <class T>
 int
-enabled_if_char (_TYPENAME std::enable_if<!is_char<T>::val>::type* = 0)
+enabled_if_char (typename std::enable_if<!is_char<T>::val>::type* = 0)
 {
     return 0;
 }
@@ -150,11 +154,20 @@
 
 static void test_aligned_storage ()
 {
+#ifdef _RWSTD_NO_ALIGN_TRAITS
+
+    rw_warn (0, 0, __LINE__,
+             "test_aligned_storage disabled because "
+             "_RWSTD_NO_ALIGN_TRAITS is defined");
+
+#else
+
 #define TEST(Size,Align)                                           \
     {                                                              \
       typedef std::aligned_storage<Size, Align>::type storage_t;   \
       test_aligned_storage(__LINE__,                               \
-          Size, sizeof (storage_t), Align, __alignof (storage_t)); \
+          Size, sizeof (storage_t), Align,                         \
+          std::alignment_of<storage_t>::value);                    \
     } typedef void __dummy
 
     TEST (1, 1);
@@ -177,18 +190,19 @@
     {                                                              \
       typedef std::aligned_storage<Size>::type storage_t;          \
       test_aligned_storage(__LINE__,                               \
-          Size, sizeof (storage_t), 0, __alignof (storage_t));     \
+          Size, sizeof (storage_t), 0,                             \
+          std::alignment_of<storage_t>::value);                    \
     } typedef void __dummy
 
     // test default alignment
     TEST (1);
-    TEST (1);
-    TEST (1);
-    TEST (1);
+    TEST (2);
+    TEST (4);
+    TEST (8);
 
-    TEST (9);
-    TEST (9);
-    TEST (9);
+    TEST (3);
+    TEST (5);
+    TEST (7);
     TEST (9);
 
     TEST (55);
@@ -197,10 +211,14 @@
     TEST (19);
 
 #undef  TEST
+
+#endif // _RWSTD_NO_ALIGN_TRAITS
 }
 
 /**************************************************************************/
 
+#ifndef _RWSTD_NO_ALIGN_TRAITS
+
 struct null_t { };
 
 // get the maximum of 8 values
@@ -293,8 +311,19 @@
 
 struct struct_t { };
 
+#endif // !_RWSTD_NO_ALIGN_TRAITS
+
+
 static void test_aligned_union ()
 {
+#ifdef _RWSTD_NO_ALIGN_TRAITS
+
+    rw_warn (0, 0, __LINE__,
+             "test_aligned_union disabled because "
+             "_RWSTD_NO_ALIGN_TRAITS is defined");
+
+#else
+
 #define TEST(Len,T1) \
     aligned_union_tester<Len,T1>::test(__LINE__,#T1)
 
@@ -336,6 +365,8 @@
     TEST (17, void (struct_t::*)(), long, int, void*, char);
 
 #undef  TEST
+
+#endif // _RWSTD_NO_ALIGN_TRAITS
 }
 
 /**************************************************************************/
@@ -473,4 +504,3 @@
                     0);
 }
 
-
diff --git a/tests/utilities/20.meta.trans.ptr.cpp b/tests/utilities/20.meta.trans.ptr.cpp
index 2a6047c..99a3c8d 100644
--- a/tests/utilities/20.meta.trans.ptr.cpp
+++ b/tests/utilities/20.meta.trans.ptr.cpp
@@ -28,6 +28,7 @@
  **************************************************************************/
 
 #include <rw_driver.h>
+#include <rw/_defs.h>
 
 // compile out all test code if extensions disabled
 #ifndef _RWSTD_NO_EXT_CXX_0X
diff --git a/tests/utilities/20.meta.trans.ref.cpp b/tests/utilities/20.meta.trans.ref.cpp
index dc7612c..023c9e4 100644
--- a/tests/utilities/20.meta.trans.ref.cpp
+++ b/tests/utilities/20.meta.trans.ref.cpp
@@ -28,6 +28,7 @@
  **************************************************************************/
 
 #include <rw_driver.h>
+#include <rw/_defs.h>
 
 // compile out all test code if extensions disabled
 #ifndef _RWSTD_NO_EXT_CXX_0X
diff --git a/tests/utilities/20.meta.trans.sign.cpp b/tests/utilities/20.meta.trans.sign.cpp
index f0c544d..9e86953 100644
--- a/tests/utilities/20.meta.trans.sign.cpp
+++ b/tests/utilities/20.meta.trans.sign.cpp
@@ -27,15 +27,16 @@
  *
  **************************************************************************/
 
-#include <stddef.h>
-
 #include <rw_driver.h>
+#include <rw/_defs.h>
 
 // compile out all test code if extensions disabled
 #ifndef _RWSTD_NO_EXT_CXX_0X
 
 #include <type_traits>
 
+#include <stddef.h>
+
 /**************************************************************************/
 
 template <class T, class U>
diff --git a/tests/utilities/20.meta.unary.cat.cpp b/tests/utilities/20.meta.unary.cat.cpp
index b4b4b0b..af9d699 100644
--- a/tests/utilities/20.meta.unary.cat.cpp
+++ b/tests/utilities/20.meta.unary.cat.cpp
@@ -27,15 +27,16 @@
  *
  **************************************************************************/
 
-#include <stddef.h>
-
 #include <rw_driver.h>
+#include <rw/_defs.h>
 
 // compile out all test code if extensions disabled
 #ifndef _RWSTD_NO_EXT_CXX_0X
 
 #include <type_traits>
 
+#include <stddef.h>
+
 /**************************************************************************/
 
 static void
@@ -45,7 +46,7 @@
 {
     // verify that the expected trait is actually working
 
-    if (rw_assert (value != false, 0, __LINE__,
+    if (rw_assert (value != false, 0, line,
                    "%s<%s>::value was %b, expected true",
                    trait_name, type_name, value))
     {
@@ -192,7 +193,8 @@
     TEST(std::is_rvalue_reference, char&&);
 #else
     rw_warn (0, 0, __LINE__,
-             "no compiler support for rvalue references; test disabled");
+             "test_is_rvalue_reference() disabled because "
+             "_RWSTD_NO_RVALUE_REFERENCES is defined");
 #endif   // _RWSTD_NO_RVALUE_REFERENCES
 }
 
@@ -242,7 +244,16 @@
 
 static void test_is_union ()
 {
+#if !defined (_RWSTD_TT_IS_CLASS) && !defined (_RWSTD_TT_IS_UNION)
+
+    rw_warn (0, 0, __LINE__,
+             "test_is_union() disabled because neither of "
+             "_RWSTD_TT_IS_CLASS or _RWSTD_TT_IS_UNION is "
+             "defined");
+
+#else
     TEST (std::is_union, union_t);
+#endif
 }
 
 static void test_is_class ()
diff --git a/tests/utilities/20.meta.unary.comp.cpp b/tests/utilities/20.meta.unary.comp.cpp
index 6919ad0..36681c8 100644
--- a/tests/utilities/20.meta.unary.comp.cpp
+++ b/tests/utilities/20.meta.unary.comp.cpp
@@ -28,6 +28,7 @@
  **************************************************************************/
 
 #include <rw_driver.h>
+#include <rw/_defs.h>
 
 // compile out all test code if extensions disabled
 #ifndef _RWSTD_NO_EXT_CXX_0X
diff --git a/tests/utilities/20.meta.unary.nothrow.cpp b/tests/utilities/20.meta.unary.nothrow.cpp
new file mode 100644
index 0000000..3766941
--- /dev/null
+++ b/tests/utilities/20.meta.unary.nothrow.cpp
@@ -0,0 +1,757 @@
+/***************************************************************************
+ *
+ * 20.meta.unary.prop.cpp - test exercising meta.unary.prop,
+ *                          has_nothrow_xxx traits
+ *
+ * $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.
+ *
+ **************************************************************************/
+
+#include <rw_driver.h>
+
+#ifndef _RWSTD_NO_EXT_CXX_0X
+
+// only compele when C++ 0x extensions are enabled
+
+#include <type_traits>
+
+#define THROW   public: enum { value = 0 }
+#define NOTHROW public: enum { value = 1 }
+
+struct A {
+    struct A1 { NOTHROW; /* trivial copy ctor */ };
+    struct A2 { NOTHROW; A2 (A2&) throw (); };
+    struct A3 { NOTHROW; A3 (const A3&) throw (); };
+    struct A4 { NOTHROW; A4 (volatile A4&) throw (); };
+    struct A5 { NOTHROW; A5 (const volatile A5&) throw (); };
+
+#ifndef _RWSTD_NO_RVALUE_REFERENCES
+
+    // move ctor overloads (move ctor is not a copy ctor)
+    struct A6 { NOTHROW; A6 (A6&&) throw (); };
+    struct A7 { NOTHROW; A7 (const A6&&) throw (); };
+    struct A8 { NOTHROW; A8 (volatile A6&&) throw (); };
+    struct A9 { NOTHROW; A9 (const volatile A6&&) throw (); };
+
+#endif   // _RWSTD_NO_RVALUE_REFERENCES
+
+};
+
+
+struct B {
+    struct B1 { THROW; B1 (B1&); };
+    struct B2 { THROW; B2 (const B2&); };
+    struct B3 { THROW; B3 (volatile B3&); };
+    struct B4 { THROW; B4 (const volatile B4&); };
+
+#ifndef _RWSTD_NO_RVALUE_REFERENCES
+
+    // move ctor overloads (move ctor is not a copy ctor)
+    struct B5 { NOTHROW; B5 (B5&&); };
+    struct B6 { NOTHROW; B6 (const B6&&); };
+    struct B7 { NOTHROW; B7 (volatile B7&&); };
+    struct B8 { NOTHROW; B8 (const volatile B8&&); };
+
+#endif   // _RWSTD_NO_RVALUE_REFERENCES
+
+};
+
+
+struct C {
+    // same as A::A* but with inaccessible copy ctor
+
+    class C1 { NOTHROW; private: /* trivial copy ctor */ };
+    class C2 { NOTHROW; private: C2 (C2&) throw (); };
+    class C3 { NOTHROW; private: C3 (const C3&) throw (); };
+    class C4 { NOTHROW; private: C4 (volatile C4&) throw (); };
+    class C5 { NOTHROW; private: C5 (const volatile C5&) throw (); };
+
+#ifndef _RWSTD_NO_RVALUE_REFERENCES
+
+    // move ctor overloads (move ctor is not a copy ctor)
+    class C6 { NOTHROW; private: C6 (C6&&) throw (); };
+    class C7 { NOTHROW; private: C7 (const C7&&) throw (); };
+    class C8 { NOTHROW; private: C8 (volatile C8&&) throw (); };
+    class C9 { NOTHROW; private: C9 (const volatile C9&&) throw (); };
+
+#endif   // _RWSTD_NO_RVALUE_REFERENCES
+
+};
+
+
+struct D {
+    // same as B::B* but with inaccessible copy ctor
+
+    class D1 { NOTHROW; /* trivial copy ctor */ };
+    class D2 { NOTHROW; D2 (D2&) throw (); };
+    class D3 { NOTHROW; D3 (const D3&) throw (); };
+    class D4 { NOTHROW; D4 (volatile D4&) throw (); };
+    class D5 { NOTHROW; D5 (const volatile D5&) throw (); };
+
+#ifndef _RWSTD_NO_RVALUE_REFERENCES
+
+    // move ctor overloads (move ctor is not a copy ctor)
+    class D6 { NOTHROW; D6 (D6&&) throw (); };
+    class D7 { NOTHROW; D7 (const D7&&) throw (); };
+    class D8 { NOTHROW; D8 (volatile D8&&) throw (); };
+    class D9 { NOTHROW; D9 (const volatile D9&&) throw (); };
+
+#endif   // _RWSTD_NO_RVALUE_REFERENCES
+
+};
+
+
+struct E {
+    // both const and non-const copy ctors
+
+    struct E1 {
+        NOTHROW;
+        E1 (E1&) throw () { }
+        E1 (const E1&) throw () { }
+    };
+
+    struct E2 {
+        THROW;
+        E2 (E2&) throw () { }
+        E2 (const E2&);
+    };
+
+    struct E3 {
+        THROW;
+        E3 (E3&);
+        E3 (const E3&) throw () { }
+    };
+
+    struct E4 {
+        THROW;
+        E4 (E4&);
+        E4 (const E4&);
+    };
+};
+
+
+struct F {
+    // non-const, const, and volatile copy ctors
+
+    struct F1 {
+        NOTHROW;
+        F1 (F1&) throw () { }
+        F1 (const F1&) throw () { }
+        F1 (volatile F1&) throw () { }
+    };
+
+    struct F2 {
+        THROW;
+        F2 (F2&) throw () { }
+        F2 (const F2&) throw () { }
+        F2 (volatile F2&);
+    };
+
+    struct F3 {
+        THROW;
+        F3 (F3&) throw () { }
+        F3 (const F3&);
+        F3 (volatile F3&) throw () { }
+    };
+
+    struct F4 {
+        THROW;
+        F4 (F4&);
+        F4 (const F4&) throw () { }
+        F4 (volatile F4&) throw () { }
+    };
+};
+
+
+struct G {
+    // non-const, const, volatile, and const volatile copy ctors
+
+    struct G1 {
+        NOTHROW;
+        G1 (G1&) throw ();
+        G1 (const G1&) throw ();
+        G1 (volatile G1&) throw ();
+        G1 (const volatile G1&) throw ();
+    };
+
+    struct G2 {
+        THROW;
+        G2 (G2&) throw ();
+        G2 (const G2&) throw ();
+        G2 (volatile G2&) throw ();
+        G2 (const volatile G2&);
+    };
+
+    struct G3 {
+        THROW;
+        G3 (G3&) throw ();
+        G3 (const G3&) throw ();
+        G3 (volatile G3&);
+        G3 (const volatile G3&) throw ();
+    };
+
+    struct G4 {
+        THROW;
+        G4 (G4&) throw ();
+        G4 (const G4&);
+        G4 (volatile G4&) throw ();
+        G4 (const volatile G4&) throw ();
+    };
+
+    struct G5 {
+        THROW;
+        G5 (G5&);
+        G5 (const G5&) throw ();
+        G5 (volatile G5&) throw ();
+        G5 (const volatile G5&) throw ();
+    };
+};
+
+
+struct H {
+    // non-const, const, volatile, and const volatile copy ctors
+
+    struct H1 {
+        NOTHROW;
+        H1 (H1&) throw ();
+        H1 (const H1&) throw ();
+        H1 (volatile H1&) throw ();
+        H1 (const volatile H1&) throw ();
+    };
+
+    struct H2 {
+        THROW;
+        H2 (H2&) throw ();
+        H2 (const H2&) throw ();
+        H2 (volatile H2&) throw ();
+        H2 (const volatile H2&);
+    };
+
+    struct H3 {
+        THROW;
+        H3 (H3&) throw ();
+        H3 (const H3&) throw ();
+        H3 (volatile H3&);
+        H3 (const volatile H3&) throw ();
+    };
+
+    struct H4 {
+        THROW;
+        H4 (H4&) throw ();
+        H4 (const H4&);
+        H4 (volatile H4&) throw ();
+        H4 (const volatile H4&) throw ();
+    };
+
+    struct H5 {
+        THROW;
+        H5 (H5&);
+        H5 (const H5&) throw ();
+        H5 (volatile H5&) throw ();
+        H5 (const volatile H5&) throw ();
+    };
+};
+
+
+struct I {
+    // non-const, const, volatile, and const volatile copy ctors
+    // all with second argument
+
+    struct I1 {
+        NOTHROW;
+        I1 (I1&, int = 0) throw ();
+        I1 (const I1&, int = 0) throw ();
+        I1 (volatile I1&, int = 0) throw ();
+        I1 (const volatile I1&, int = 0) throw ();
+    };
+
+    struct I2 {
+        THROW;
+        I2 (I2&, int = 0) throw ();
+        I2 (const I2&, int = 0) throw ();
+        I2 (volatile I2&, int = 0) throw ();
+        I2 (const volatile I2&, int = 0);
+    };
+
+    struct I3 {
+        THROW;
+        I3 (I3&, int = 0) throw ();
+        I3 (const I3&, int = 0) throw ();
+        I3 (volatile I3&, int = 0);
+        I3 (const volatile I3&, int = 0) throw ();
+    };
+
+    struct I4 {
+        THROW;
+        I4 (I4&, int = 0) throw ();
+        I4 (const I4&, int = 0);
+        I4 (volatile I4&, int = 0) throw ();
+        I4 (const volatile I4&, int = 0) throw ();
+    };
+
+    struct I5 {
+        THROW;
+        I5 (I5&, int = 0);
+        I5 (const I5&, int = 0) throw ();
+        I5 (volatile I5&, int = 0) throw ();
+        I5 (const volatile I5&, int = 0) throw ();
+    };
+};
+
+
+struct J {
+    // non-const, const, volatile, and const volatile copy ctors
+    // plus a template ctor (a template ctor is never a copy ctor)
+
+    struct J1 {
+        NOTHROW;
+        J1 (J1&) throw ();
+        J1 (const J1&) throw ();
+        J1 (volatile J1&) throw ();
+        J1 (const volatile J1&) throw ();
+        template <class T> J1 (T); // not a copy ctor
+    };
+
+    struct J2 {
+        NOTHROW;
+        J2 (J2&) throw ();
+        J2 (const J2&) throw ();
+        J2 (volatile J2&) throw ();
+        J2 (const volatile J2&) throw ();
+        template <class T> J2 (const T&); // not a copy ctor
+    };
+
+    struct J3 {
+        NOTHROW;
+        J3 (J3&) throw ();
+        J3 (const J3&) throw ();
+        J3 (volatile J3&) throw ();
+        J3 (const volatile J3&) throw ();
+        template <class T> J3 (volatile T&); // not a copy ctor
+    };
+
+    struct J4 {
+        NOTHROW;
+        J4 (J4&) throw ();
+        J4 (const J4&) throw (){ }
+        J4 (volatile J4&) throw ();
+        J4 (const volatile J4&) throw ();
+        template <class T> J4 (const volatile T&); // not a copy ctor
+    };
+};
+
+
+struct K {
+    // nothrow non-const, const, volatile, and const volatile copy
+    // ctors plus a throwing non-copy ctor
+
+    struct K1 {
+        NOTHROW;
+        K1 (K1&) throw ();
+        K1 (const K1&) throw ();
+        K1 (volatile K1&) throw ();
+        K1 (const volatile K1&) throw ();
+        template <class T> K1 (T) throw (); // not a copy ctor
+    };
+
+#ifndef _RWSTD_NO_VARIADIC_TEMPLATES
+
+    struct K2 {
+        NOTHROW;
+        K2 (K2&) throw ();
+        K2 (const K2&) throw ();
+        K2 (volatile K2&) throw ();
+        K2 (const volatile K2&) throw ();
+        template <class ...T> K2 (T...); // not a copy ctor
+    };
+
+#endif   // _RWSTD_NO_VARIADIC_TEMPLATES
+
+#ifndef _RWSTD_NO_RVALUE_REFERENCES
+
+    struct K3 {
+        NOTHROW;
+        K3 (K3&) throw ();
+        K3 (const K3&) throw ();
+        K3 (volatile K3&) throw ();
+        K3 (const volatile K3&) throw ();
+        K3 (K3&&); // not a copy ctor
+    };
+
+#endif   // _RWSTD_NO_RVALUE_REFERENCES
+
+    struct K4 {
+        NOTHROW;
+        K4 (K4&) throw ();
+        K4 (const K4&) throw ();
+        K4 (volatile K4&) throw ();
+        K4 (const volatile K4&) throw ();
+        K4 (...); // not a copy ctor
+    };
+
+    struct K5 {
+        NOTHROW;
+        K5 (K5&) throw ();
+        K5 (const K5&) throw ();
+        K5 (volatile K5&) throw ();
+        K5 (const volatile K5&) throw ();
+        K5 (int); // not a copy ctor
+    };
+};
+
+struct L {
+
+    struct L1 {
+        THROW;
+        // member non-const copy ctor may throw
+        struct L1_1 { L1_1 (L1_1&); } l1_1;
+    };
+
+    struct L2 {
+        THROW;
+        // member const copy ctor may throw
+        struct L2_1 { L2_1 (const L2_1&); } l2_1;
+    };
+
+    struct L3 {
+        THROW;
+        // member volatile copy ctor may throw
+        struct L3_1 { L3_1 (volatile L3_1&); } l3_1;
+    };
+
+    struct L4 {
+        THROW;
+        // member const volatile copy ctor may throw
+        struct L4_1 { L4_1 (const volatile L4_1&); } l4_1;
+    };
+
+    struct L5 {
+        NOTHROW;
+        // member non-const copy ctor may throw
+        // but same copy ctor of parent class doesn't
+        L5 (L5&) throw ();
+        struct L5_1 { L5_1 (L5_1&); } l5_1;
+    };
+
+    struct L6 {
+        NOTHROW;
+        // member const copy ctor may throw
+        // but same copy ctor of parent class doesn't
+        L6 (const L6&) throw ();
+        struct L6_1 { L6_1 (const L6_1&); } l6_1;
+    };
+
+    struct L7 {
+        NOTHROW;
+        // member volatile copy ctor may throw
+        // but same copy ctor of parent class doesn't
+        L7 (volatile L7&) throw ();
+        struct L7_1 { L7_1 (volatile L7_1&); } l7_1;
+    };
+
+    struct L8 {
+        NOTHROW;
+        // member const volatile copy ctor may throw
+        // but same copy ctor of parent class doesn't
+        L8 (const volatile L8&) throw ();
+        struct L8_1 { L8_1 (const volatile L8_1&); } l8_1;
+    };
+
+    struct L9 {
+        NOTHROW;
+        // member const copy ctor may throw
+        // but non-const copy ctor of parent class doesn't
+        L9 (L9&) throw ();
+        struct L9_1 { L9_1 (const L9_1&); } l9_1;
+    };
+
+    struct L10 {
+        NOTHROW;
+        // member non-const copy ctor may throw
+        // but const copy ctor of parent class doesn't
+        L10 (const L10&) throw ();
+        struct L10_1 { L10_1 (L10_1&); } l10_1;
+    };
+
+    struct L11 {
+        NOTHROW;
+        L11 (L11&) throw ();
+        L11 (const L11&) throw ();
+
+        struct L11_1 {
+            L11_1 (L11_1&) throw (int);
+            L11_1 (const L11_1&) throw (int);
+        } l11_1;
+    };
+
+    struct L12 {
+        NOTHROW;
+        L12 (const L12&) throw ();
+
+        struct L12_1 {
+            L12_1 (L12_1&) throw (int);
+            L12_1 (const L12_1&) throw (int);
+            L12_1 (volatile L12_1&) throw (int);
+            L12_1 (const volatile L12_1&) throw (int);
+        } l12_1;
+    };
+
+    struct L13 {
+        NOTHROW;
+        L13 (const L13&) throw ();
+
+        struct L13_1 {
+            L13_1 (L13_1&) throw ();
+            L13_1 (const L13_1&) throw ();
+            L13_1 (volatile L13_1&) throw ();
+            L13_1 (const volatile L13_1&) throw ();
+        } l13_1;
+
+        struct L13_2 {
+            L13_2 (L13_2&) throw ();
+            L13_2 (const L13_2&) throw ();
+            L13_2 (volatile L13_2&) throw ();
+            L13_2 (const volatile L13_2&) throw (int);   // may throw
+        } l13_2;
+    };
+
+    struct L14 {
+        NOTHROW;
+        L14 (const L14&) throw ();
+
+        struct L14_1 {
+            L14_1 (L14_1&) throw ();
+            L14_1 (const L14_1&) throw ();
+            L14_1 (volatile L14_1&) throw ();
+            L14_1 (const volatile L14_1&) throw ();
+        } l14_1;
+
+        struct L14_2 {
+            L14_2 (L14_2&) throw ();
+            L14_2 (const L14_2&) throw ();
+            L14_2 (volatile L14_2&) throw (int);    // may throw
+            L14_2 (const volatile L14_2&) throw ();
+        } l14_2;
+    };
+
+    struct L15 {
+        NOTHROW;
+        L15 (const L15&) throw ();
+
+        struct L15_1 {
+            L15_1 (L15_1&) throw ();
+            L15_1 (const L15_1&) throw ();
+            L15_1 (volatile L15_1&) throw ();
+            L15_1 (const volatile L15_1&) throw ();
+        } l15_1;
+
+        struct L15_2 {
+            L15_2 (L15_2&) throw ();
+            L15_2 (const L15_2&) throw (int);   // may throw
+            L15_2 (volatile L15_2&) throw ();
+            L15_2 (const volatile L15_2&) throw ();
+        } l15_2;
+    };
+
+    struct L16 {
+        NOTHROW;
+        L16 (const L16&) throw ();
+
+        struct L16_1 {
+            L16_1 (L16_1&) throw ();
+            L16_1 (const L16_1&) throw ();
+            L16_1 (volatile L16_1&) throw ();
+            L16_1 (const volatile L16_1&) throw ();
+        } l16_1;
+
+        struct L16_2 {
+            L16_2 (L16_2&) throw (int);   // may throw
+            L16_2 (const L16_2&) throw ();
+            L16_2 (volatile L16_2&) throw ();
+            L16_2 (const volatile L16_2&) throw ();
+        } l16_2;
+    };
+};
+
+
+static int
+test_has_nothrow_copy ()
+{
+#ifndef _RWSTD_TT_HAS_NOTHROW_COPY
+
+    rw_warn (0, 0, __LINE__,
+             "test_has_nothrow_copy() disabled because "
+             "_RWSTD_TT_HAS_NOTHROW_COPY is not defined");
+
+#else
+
+    // exercise the has_nothrow_copy_constructor trait
+#define TEST(T)                                                         \
+    rw_assert (std::has_nothrow_copy_constructor<T>::value == T::value, \
+               0, __LINE__,                                             \
+               "std::has_nothrow_copy_constructor<%s>::value == %d", #T, \
+               std::has_nothrow_copy_constructor<T>::value)
+
+    TEST (A::A1);
+    TEST (A::A2);
+    TEST (A::A3);
+    TEST (A::A4);
+    TEST (A::A5);
+#ifndef _RWSTD_NO_RVALUE_REFERENCES
+    TEST (A::A6);
+    TEST (A::A7);
+    TEST (A::A8);
+    TEST (A::A9);
+#endif
+
+    TEST (B::B1);
+    TEST (B::B2);
+    TEST (B::B3);
+    TEST (B::B4);
+#ifndef _RWSTD_NO_RVALUE_REFERENCES
+    TEST (B::B5);
+    TEST (B::B6);
+    TEST (B::B7);
+    TEST (B::B8);
+#endif
+
+    TEST (C::C1);
+    TEST (C::C2);
+    TEST (C::C3);
+    TEST (C::C4);
+    TEST (C::C5);
+#ifndef _RWSTD_NO_RVALUE_REFERENCES
+    TEST (C::C6);
+    TEST (C::C7);
+    TEST (C::C8);
+    TEST (C::C9);
+#endif
+
+    TEST (D::D1);
+    TEST (D::D2);
+    TEST (D::D3);
+    TEST (D::D4);
+    TEST (D::D5);
+#ifndef _RWSTD_NO_RVALUE_REFERENCES
+    TEST (D::D6);
+    TEST (D::D7);
+    TEST (D::D8);
+    TEST (D::D9);
+#endif
+
+    TEST (E::E1);
+    TEST (E::E2);
+    TEST (E::E3);
+    TEST (E::E4);
+
+    TEST (F::F1);
+    TEST (F::F2);
+    TEST (F::F3);
+    TEST (F::F4);
+
+    TEST (G::G1);
+    TEST (G::G2);
+    TEST (G::G3);
+    TEST (G::G4);
+    TEST (G::G5);
+
+    TEST (H::H1);
+    TEST (H::H2);
+    TEST (H::H3);
+    TEST (H::H4);
+    TEST (H::H5);
+
+    TEST (I::I1);
+    TEST (I::I2);
+    TEST (I::I3);
+    TEST (I::I4);
+    TEST (I::I5);
+
+    TEST (J::J1);
+    TEST (J::J2);
+    TEST (J::J3);
+    TEST (J::J4);
+
+    TEST (K::K1);
+#  ifndef _RWSTD_NO_VARIADIC_TEMPLATES
+    TEST (K::K2);
+#  endif
+#  ifndef _RWSTD_NO_RVALUE_REFERENCES
+    TEST (K::K3);
+#  endif
+    TEST (K::K4);
+    TEST (K::K5);
+
+    TEST (L::L1);
+    TEST (L::L2);
+    TEST (L::L3);
+    TEST (L::L4);
+    TEST (L::L5);
+    TEST (L::L6);
+    TEST (L::L7);
+    TEST (L::L8);
+    TEST (L::L9);
+    TEST (L::L10);
+    TEST (L::L11);
+    TEST (L::L12);
+    TEST (L::L13);
+    TEST (L::L14);
+    TEST (L::L15);
+    TEST (L::L16);
+
+#endif
+
+    return 0;
+}
+
+static int
+run_test (int, char*[])
+{
+    test_has_nothrow_copy ();
+
+    return 0;
+}
+
+/**************************************************************************/
+
+#else // _RWSTD_NO_EXT_CXX_0X
+
+/**************************************************************************/
+
+static int run_test (int, char*[])
+{
+    rw_warn (0, 0, __LINE__,
+             "test disabled because _RWSTD_NO_EXT_CXX_0X is defined");
+    return 0;
+}
+
+#endif // !_RWSTD_NO_EXT_CXX_0X
+
+/**************************************************************************/
+
+int main (int argc, char*argv[])
+{
+    return rw_test (argc, argv, __FILE__,
+                    "meta.unary.prop",
+                    "std::has_nothrow_xxx traits",
+                    run_test,
+                    0);
+}
diff --git a/tests/utilities/20.meta.unary.prop.cpp b/tests/utilities/20.meta.unary.prop.cpp
index 4e18340..0a07b8e 100644
--- a/tests/utilities/20.meta.unary.prop.cpp
+++ b/tests/utilities/20.meta.unary.prop.cpp
@@ -27,17 +27,24 @@
  *
  **************************************************************************/
 
-#include <stddef.h>
-
 #include <rw_driver.h>
+#include <rw/_defs.h>
 
 // compile out all test code if extensions disabled
 #ifndef _RWSTD_NO_EXT_CXX_0X
 
 #include <type_traits>
 
+#include <stddef.h>
+
 /**************************************************************************/
 
+// function with C linkage
+extern "C" typedef void cfun_t ();
+
+// incomplete type (never defined)
+struct incomplete_t;
+
 struct struct_t {
     int i_; float f_;
 };
@@ -136,16 +143,16 @@
 };
 
 struct no_trivial_ctor_t {
-    no_trivial_ctor_t () { }
+    no_trivial_ctor_t () _THROWS (()) { }
 };
 
 struct no_trivial_copy_t {
-    no_trivial_copy_t (const no_trivial_copy_t&) { }
+    no_trivial_copy_t (const no_trivial_copy_t&) _THROWS (()) { }
 };
 
 struct no_trivial_assign_t {
     no_trivial_assign_t&
-    operator= (const no_trivial_assign_t&) {
+    operator= (const no_trivial_assign_t&) _THROWS (()) {
         return *this;
     }
 };
@@ -228,7 +235,7 @@
 }
 
 #define _TEST(Trait, Type, Expect)                                   \
-    test_trait (__LINE__, Trait<Type>::value, Expect, #Trait, #Type)
+    test_trait (__LINE__, Trait< Type >::value, Expect, #Trait, #Type)
 
 #define TEST(Trait, Type, Expect)                                    \
     _TEST (Trait, Type, Expect)
@@ -248,6 +255,11 @@
     TEST (std::is_const,  V void, false);
     TEST (std::is_const, CV void, true);
 
+    // incomplete type other than void
+    TEST (std::is_const,    incomplete_t, false);
+    TEST (std::is_const, C  incomplete_t, true);
+    TEST (std::is_const,  V incomplete_t, false);
+    TEST (std::is_const, CV incomplete_t, true);
 
     TEST (std::is_const,    int, false);
     TEST (std::is_const, C  int, true);
@@ -282,12 +294,30 @@
     TEST (std::is_const, CV int&, false);
 
     // array types
+    TEST (std::is_const,    int [], false);
+    TEST (std::is_const, C  int [], true);
+    TEST (std::is_const,  V int [], false);
+    TEST (std::is_const, CV int [], true);
+
     TEST (std::is_const,    int [2], false);
     TEST (std::is_const, C  int [2], true);
     TEST (std::is_const,  V int [2], false);
     TEST (std::is_const, CV int [2], true);
+
+    // array of incomplete type
+    TEST (std::is_const,    incomplete_t [], false);
+    TEST (std::is_const, C  incomplete_t [], true);
+    TEST (std::is_const,  V incomplete_t [], false);
+    TEST (std::is_const, CV incomplete_t [], true);
+
+    // C++ function, C function, and pointers to member functions
+    TEST (std::is_const,    void (),                    false);
+    TEST (std::is_const,    cfun_t,                     false);
+    TEST (std::is_const,    void (struct_t::*)(),       false);
+    TEST (std::is_const,    void (struct_t::*)() const, false);
 }
 
+
 void test_is_volatile ()
 {
     TEST (std::is_volatile,    void, false);
@@ -295,6 +325,12 @@
     TEST (std::is_volatile,  V void, true);
     TEST (std::is_volatile, CV void, true);
 
+    // incomplete type other than void
+    TEST (std::is_volatile,    incomplete_t, false);
+    TEST (std::is_volatile, C  incomplete_t, false);
+    TEST (std::is_volatile,  V incomplete_t, true);
+    TEST (std::is_volatile, CV incomplete_t, true);
+
     TEST (std::is_volatile,    int, false);
     TEST (std::is_volatile, C  int, false);
     TEST (std::is_volatile,  V int, true);
@@ -328,12 +364,30 @@
     TEST (std::is_volatile, CV int&, false);
 
     // array types
+    TEST (std::is_volatile,    int [], false);
+    TEST (std::is_volatile, C  int [], false);
+    TEST (std::is_volatile,  V int [], true);
+    TEST (std::is_volatile, CV int [], true);
+
     TEST (std::is_volatile,    int [2], false);
     TEST (std::is_volatile, C  int [2], false);
     TEST (std::is_volatile,  V int [2], true);
     TEST (std::is_volatile, CV int [2], true);
+
+    // array of incomplete type
+    TEST (std::is_volatile,    incomplete_t [], false);
+    TEST (std::is_volatile, C  incomplete_t [], false);
+    TEST (std::is_volatile,  V incomplete_t [], true);
+    TEST (std::is_volatile, CV incomplete_t [], true);
+
+    // C++ function, C function, and pointers to member functions
+    TEST (std::is_volatile,    void (),                       false);
+    TEST (std::is_volatile,    cfun_t,                        false);
+    TEST (std::is_volatile,    void (struct_t::*)(),          false);
+    TEST (std::is_volatile,    void (struct_t::*)() volatile, false);
 }
 
+
 static void test_has_trivial_assign ()
 {
     TEST (std::has_trivial_assign, long, true);
@@ -346,9 +400,30 @@
     TEST (std::has_trivial_assign, V long&, false);
     TEST (std::has_trivial_assign, CV long&, false);
 
-    TEST (std::has_trivial_assign, long[2], true);
+    TEST (std::has_trivial_assign, long [2], false);
 
+#if    defined (_RWSTD_TT_HAS_TRIVIAL_ASSIGN) \
+    || defined (_RWSTD_TT_IS_POD)
     TEST (std::has_trivial_assign, struct_t, true);
+#else
+    rw_warn (0, 0, __LINE__,
+             "portions of test_has_trivial_assign() have been disabled "
+             "due to lack of compiler support.");
+#endif
+
+    TEST (std::has_trivial_assign, struct_t [2], false);
+    TEST (std::has_trivial_assign, const struct_t, false);
+    TEST (std::has_trivial_assign, struct_t&, false);
+
+#if defined (_RWSTD_TT_HAS_TRIVIAL_ASSIGN)
+    TEST (std::has_trivial_assign, no_trivial_ctor_t, true);
+    TEST (std::has_trivial_assign, no_trivial_copy_t, true);
+    TEST (std::has_trivial_assign, no_trivial_dtor_t, true);
+#else
+    rw_warn (0, 0, __LINE__,
+             "portions of test_has_trivial_assign() have been disabled "
+             "due to lack of compiler support.");
+#endif
 
     TEST (std::has_trivial_assign, no_trivial_assign_t, false);
     TEST (std::has_trivial_assign, public_derived_t<no_trivial_assign_t>, false);
@@ -366,15 +441,43 @@
     TEST (std::has_nothrow_assign, V long&, false);
     TEST (std::has_nothrow_assign, CV long&, false);
 
-    TEST (std::has_nothrow_assign, long[2], true);
+    TEST (std::has_nothrow_assign, long [2], false);
 
+#if    defined (_RWSTD_TT_HAS_NOTHROW_ASSIGN) \
+    || defined (_RWSTD_TT_HAS_TRIVIAL_ASSIGN) \
+    || defined (_RWSTD_TT_IS_POD)
     TEST (std::has_nothrow_assign, struct_t, true);
-    TEST (std::has_nothrow_assign, no_trivial_assign_t, true);
+    TEST (std::has_nothrow_assign, volatile struct_t, true);
+#else
+    rw_warn (0, 0, __LINE__,
+             "portions of test_has_nothrow_assign() have been disabled "
+             "due to lack of compiler support.");
+#endif
+
+    TEST (std::has_nothrow_assign, struct_t [2], false);
+    TEST (std::has_nothrow_assign, const struct_t, false);
+    TEST (std::has_nothrow_assign, struct_t&, false);
+
+#if defined (_RWSTD_TT_HAS_NOTHROW_ASSIGN)
+    TEST (std::has_nothrow_assign, no_trivial_ctor_t, true);
+    TEST (std::has_nothrow_assign, no_trivial_copy_t, true);
+    TEST (std::has_nothrow_assign, no_trivial_dtor_t, true);
+#else
+    rw_warn (0, 0, __LINE__,
+             "portions of test_has_nothrow_assign() have been disabled "
+             "due to lack of compiler support.");
+#endif
+
     TEST (std::has_nothrow_assign, throwing_assign_t, false);
 }
 
 static void test_is_trivial ()
 {
+    TEST (std::is_trivial,    void, false);
+    TEST (std::is_trivial, C  void, false);
+    TEST (std::is_trivial, V  void, false);
+    TEST (std::is_trivial, CV void, false);
+
     TEST (std::is_trivial, long, true);
     TEST (std::is_trivial, C long, true);
     TEST (std::is_trivial, V long, true);
@@ -385,6 +488,11 @@
     TEST (std::is_trivial, V long&, false);
     TEST (std::is_trivial, CV long&, false);
 
+#if (   defined (_RWSTD_TT_HAS_TRIVIAL_CTOR)   \
+     && defined (_RWSTD_TT_HAS_TRIVIAL_COPY)   \
+     && defined (_RWSTD_TT_HAS_TRIVIAL_ASSIGN) \
+     && defined (_RWSTD_TT_HAS_TRIVIAL_DTOR))  \
+     || defined (_RWSTD_TT_IS_POD)
     TEST (std::is_trivial, class_t, true);
     TEST (std::is_trivial, struct_t, true);
     TEST (std::is_trivial, union_t, true);
@@ -394,6 +502,11 @@
 
     TEST (std::is_trivial, non_empty_t, true);
     TEST (std::is_trivial, public_derived_t<non_empty_t>, true);
+#else
+    rw_warn (0, 0, __LINE__,
+             "portions of test_is_trivial() have been disabled "
+             "due to lack of compiler support.");
+#endif
 
     TEST (std::is_trivial, abstract_t, false);
     TEST (std::is_trivial, public_derived_t<abstract_t>, false);
@@ -413,14 +526,13 @@
 #undef TEST
 #define TEST(Trait,Type,Expect)                                      \
     _TEST(Trait, Type, Expect);                                      \
-    _TEST(Trait, std::add_const<Type>::type, Expect);                \
-    _TEST(Trait, std::add_volatile<Type>::type, Expect);             \
-    _TEST(Trait, std::add_cv<Type>::type, Expect)
+    _TEST(Trait, std::add_const< Type >::type, Expect);              \
+    _TEST(Trait, std::add_volatile< Type >::type, Expect);           \
+    _TEST(Trait, std::add_cv< Type >::type, Expect)
 
 static void test_is_standard_layout ()
 {
     TEST (std::is_standard_layout, long, true);
-    TEST (std::is_standard_layout, non_empty_t, true);
 
     // no non-static data members of non-standard-layout type
     TEST (std::is_standard_layout, member_t<access_controlled_t>, false);
@@ -454,9 +566,24 @@
     typedef public_derived_with_member<empty_t,int> derived_from_empty_with_member;
     TEST (std::is_standard_layout, derived_from_empty_with_member, false);
 
+#if    defined (_RWSTD_TT_IS_STANDARD_LAYOUT)   \
+    || defined (_RWSTD_TT_IS_POD)
+    TEST (std::is_standard_layout, non_empty_t, true);
+
+#  if defined (_RWSTD_TT_STRICT_CXX_0X_CONFORM)
+
     // but we are allowed non-static members in one base class
     TEST (std::is_standard_layout, public_derived_t<non_empty_t>, true);
-    TEST (std::is_standard_layout, public_derived_t<public_derived_t<non_empty_t> >, true);
+    TEST (std::is_standard_layout,
+          public_derived_t<public_derived_t<non_empty_t> >, true);
+
+#  endif // _RWSTD_TT_STRICT_CXX_0X_CONFORM
+
+#else
+    rw_warn (0, 0, __LINE__,
+             "portions of test_is_standard_layout() have been disabled "
+             "due to lack of compiler support.");
+#endif
 
     // but not two base classes with non-static members
     typedef public_derived_with_member<non_empty_t, int> derived_from_non_empty_with_member;
@@ -476,13 +603,14 @@
     TEST (std::is_pod, long, true);
     TEST (std::is_pod, long [], true);
     TEST (std::is_pod, long [2], true);
-    TEST (std::is_pod, long (*)[2], true);
+    TEST (std::is_pod, long (*) [2], true);
 
     TEST (std::is_pod, void*, true);
     TEST (std::is_pod, void (*)(), true);
-    TEST (std::is_pod, void (*[])(), true);
+    TEST (std::is_pod, void (* [])(), true);
     TEST (std::is_pod, void (class_t::*)(), true);
 
+#if defined (_RWSTD_TT_IS_POD)
     // standard layout and trivial
     // 
     TEST (std::is_pod, struct_t, true);
@@ -490,10 +618,18 @@
     TEST (std::is_pod, enum_t, true);
 
     TEST (std::is_pod, empty_t, true);
-    TEST (std::is_pod, public_derived_t<empty_t>, true);
-
     TEST (std::is_pod, non_empty_t, true);
+
+#  if defined (_RWSTD_TT_STRICT_CXX_0X_CONFORM)
+    TEST (std::is_pod, public_derived_t<empty_t>, true);
     TEST (std::is_pod, public_derived_t<non_empty_t>, true);
+#  endif
+
+#else
+    rw_warn (0, 0, __LINE__,
+             "portions of test_is_pod() have been disabled "
+             "due to lack of compiler support.");
+#endif
 
     TEST (std::is_pod, abstract_t, false);
     TEST (std::is_pod, public_derived_t<abstract_t>, false);
@@ -520,8 +656,16 @@
 
     TEST (std::is_empty, empty_union, false);
 
+#if    defined(_RWSTD_TT_IS_EMPTY)  \
+    || defined (_RWSTD_TT_IS_CLASS) \
+    || defined (_RWSTD_TT_IS_UNION)
     TEST (std::is_empty, empty_t, true);
     TEST (std::is_empty, public_derived_t<empty_t>, true);
+#else
+    rw_warn (0, 0, __LINE__,
+             "portions of test_is_empty() have been disabled "
+             "due to lack of compiler support.");
+#endif
 
     TEST (std::is_empty, non_empty_t, false);
     TEST (std::is_empty, public_derived_t<non_empty_t>, false);
@@ -538,11 +682,27 @@
 
 static void test_is_polymorphic ()
 {
+    // if we can reliably detect a class type, the fallback will evaluate
+    // to true for all polymorphic types. otherwise, it will evaluate to
+    // true for all class and union types.
+
+    TEST (std::is_polymorphic, void, false);
+    TEST (std::is_polymorphic, long, false);
+    TEST (std::is_polymorphic, int*, false);
+
     TEST (std::is_polymorphic, polymorphic_t, true);
     TEST (std::is_polymorphic, public_derived_t<polymorphic_t>, true);
 
+#if    defined (_RWSTD_TT_IS_POLYMORPHIC) \
+    || defined (_RWSTD_TT_IS_CLASS) \
+    || defined (_RWSTD_TT_IS_UNION)
     TEST (std::is_polymorphic, non_polymorphic_t, false);
     TEST (std::is_polymorphic, public_derived_t<non_polymorphic_t>, false);
+#else
+    rw_warn (0, 0, __LINE__,
+             "portions of test_is_polymorphic() have been disabled "
+             "due to lack of compiler support.");
+#endif 
 
     TEST (std::is_polymorphic, abstract_t, true);
     TEST (std::is_polymorphic, public_derived_t<abstract_t>, true);
@@ -550,19 +710,57 @@
 
 static void test_is_abstract ()
 {
+    // if we can reliably detect a class type, the fallback will evaluate
+    // to true for all abstract types. otherwise, it will evaluate to
+    // true for all class and union types.
+
+    TEST (std::is_abstract, void, false);
+    TEST (std::is_abstract, long, false);
+    TEST (std::is_abstract, int*, false);
+
     TEST (std::is_abstract, abstract_t, true);
     TEST (std::is_abstract, public_derived_t<abstract_t>, true);
 
+#if    defined (_RWSTD_TT_IS_ABSTRACT) \
+    || defined (_RWSTD_TT_IS_CLASS) \
+    || defined (_RWSTD_TT_IS_UNION)
     TEST (std::is_abstract, polymorphic_t, false); // polymorphic_t is not an abstract type
     TEST (std::is_abstract, public_derived_t<polymorphic_t>, false);
+#else
+    rw_warn (0, 0, __LINE__,
+             "portions of test_is_abstract() have been disabled "
+             "due to lack of compiler support.");
+#endif
 }
 
 static void test_has_trivial_constructor ()
 {
     TEST (std::has_trivial_default_constructor, long, true);
+    TEST (std::has_trivial_default_constructor, const long, true);
+    TEST (std::has_trivial_default_constructor, volatile long, true);
     TEST (std::has_trivial_default_constructor, long&, false);
-    TEST (std::has_trivial_default_constructor, long[2], true);
+    TEST (std::has_trivial_default_constructor, long [2], true);
+
+#if    defined (_RWSTD_TT_HAS_TRIVIAL_CTOR) \
+    || defined (_RWSTD_TT_IS_POD)
     TEST (std::has_trivial_default_constructor, struct_t, true);
+    TEST (std::has_trivial_default_constructor, const struct_t, true);
+    TEST (std::has_trivial_default_constructor, volatile struct_t, true);
+    TEST (std::has_trivial_default_constructor, struct_t [2], true);
+#else
+    rw_warn (0, 0, __LINE__,
+             "portions of test_has_trivial_constructor() have been "
+             "disabled due to lack of compiler support.");
+#endif
+
+#if defined (_RWSTD_TT_HAS_TRIVIAL_CTOR)
+    TEST (std::has_trivial_default_constructor, no_trivial_assign_t, true);
+    TEST (std::has_trivial_default_constructor, no_trivial_dtor_t, true);
+#else
+    rw_warn (0, 0, __LINE__,
+             "portions of test_has_trivial_constructor() have been "
+             "disabled due to lack of compiler support.");
+#endif
 
     TEST (std::has_trivial_default_constructor, no_trivial_ctor_t, false);
     TEST (std::has_trivial_default_constructor, public_derived_t<no_trivial_ctor_t>, false);
@@ -571,10 +769,33 @@
 static void test_has_trivial_copy ()
 {
     TEST (std::has_trivial_copy_constructor, long, true);
+    TEST (std::has_trivial_copy_constructor, const long, true);
+    TEST (std::has_trivial_copy_constructor, volatile long, true);
     TEST (std::has_trivial_copy_constructor, long&, true);
-    TEST (std::has_trivial_copy_constructor, long[2], true);
+    TEST (std::has_trivial_copy_constructor, long [2], false);
 
+#if    defined (_RWSTD_TT_HAS_TRIVIAL_COPY) \
+    || defined (_RWSTD_TT_IS_POD)
     TEST (std::has_trivial_copy_constructor, struct_t, true);
+    TEST (std::has_trivial_copy_constructor, const struct_t, true);
+    TEST (std::has_trivial_copy_constructor, volatile struct_t, true);
+#else
+    rw_warn (0, 0, __LINE__,
+             "portions of test_has_trivial_copy() have been "
+             "disabled due to lack of compiler support.");
+#endif
+
+    TEST (std::has_trivial_copy_constructor, struct_t [2], false);
+
+#if defined (_RWSTD_TT_HAS_TRIVIAL_COPY)
+    TEST (std::has_trivial_copy_constructor, no_trivial_ctor_t, true);
+    TEST (std::has_trivial_copy_constructor, no_trivial_assign_t, true);
+    TEST (std::has_trivial_copy_constructor, no_trivial_dtor_t, true);
+#else
+    rw_warn (0, 0, __LINE__,
+             "portions of test_has_trivial_copy() have been "
+             "disabled due to lack of compiler support.");
+#endif
 
     TEST (std::has_trivial_copy_constructor, no_trivial_copy_t, false);
     TEST (std::has_trivial_copy_constructor, public_derived_t<no_trivial_copy_t>, false);
@@ -583,9 +804,32 @@
 static void test_has_trivial_destructor ()
 {
     TEST (std::has_trivial_destructor, long, true);
+    TEST (std::has_trivial_destructor, const long, true);
+    TEST (std::has_trivial_destructor, volatile long, true);
     TEST (std::has_trivial_destructor, long&, true);
-    TEST (std::has_trivial_destructor, long[2], true);
+    TEST (std::has_trivial_destructor, long [2], true);
+
+#if    defined (_RWSTD_TT_HAS_TRIVIAL_DTOR) \
+    || defined (_RWSTD_TT_IS_POD)
     TEST (std::has_trivial_destructor, struct_t, true);
+    TEST (std::has_trivial_destructor, const struct_t, true);
+    TEST (std::has_trivial_destructor, volatile struct_t, true);
+    TEST (std::has_trivial_destructor, struct_t [2], true);
+#else
+    rw_warn (0, 0, __LINE__,
+             "portions of test_has_trivial_destructor() have been "
+             "disabled due to lack of compiler support.");
+#endif
+
+#if defined (_RWSTD_TT_HAS_TRIVIAL_DTOR)
+    TEST (std::has_trivial_destructor, no_trivial_ctor_t, true);
+    TEST (std::has_trivial_destructor, no_trivial_copy_t, true);
+    TEST (std::has_trivial_destructor, no_trivial_assign_t, true);
+#else
+    rw_warn (0, 0, __LINE__,
+             "portions of test_has_trivial_destructor() have been "
+             "disabled due to lack of compiler support.");
+#endif
 
     TEST (std::has_trivial_destructor, no_trivial_dtor_t, false);
     TEST (std::has_trivial_destructor, public_derived_t<no_trivial_dtor_t>, false);
@@ -594,20 +838,70 @@
 static void test_has_nothrow_constructor ()
 {
     TEST (std::has_nothrow_default_constructor, long, true);
+    TEST (std::has_nothrow_default_constructor, const long, true);
+    TEST (std::has_nothrow_default_constructor, volatile long, true);
     TEST (std::has_nothrow_default_constructor, long&, false);
-    TEST (std::has_nothrow_default_constructor, long[2], true);
+    TEST (std::has_nothrow_default_constructor, long [2], true);
 
+#if    defined (_RWSTD_TT_HAS_NOTHROW_CTOR) \
+    || defined (_RWSTD_TT_HAS_TRIVIAL_CTOR) \
+    || defined (_RWSTD_TT_IS_POD)
     TEST (std::has_nothrow_default_constructor, struct_t, true);
+    TEST (std::has_nothrow_default_constructor, const struct_t, true);
+    TEST (std::has_nothrow_default_constructor, volatile struct_t, true);
+    TEST (std::has_nothrow_default_constructor, struct_t [2], true);
+#else
+    rw_warn (0, 0, __LINE__,
+             "portions of test_has_nothrow_constructor() have been "
+             "disabled due to lack of compiler support.");
+#endif
+
+#if defined (_RWSTD_TT_HAS_NOTHROW_CTOR)
+    TEST (std::has_nothrow_default_constructor, no_trivial_ctor_t, true);
+    //TEST (std::has_nothrow_default_constructor, no_trivial_copy_t, true);
+    TEST (std::has_nothrow_default_constructor, no_trivial_assign_t, true);
+    TEST (std::has_nothrow_default_constructor, struct_t, true);
+#else
+    rw_warn (0, 0, __LINE__,
+             "portions of test_has_nothrow_constructor() have been "
+             "disabled due to lack of compiler support.");
+#endif
+
     TEST (std::has_nothrow_default_constructor, throwing_ctor_t, false);
 }
 
 static void test_has_nothrow_copy ()
 {
     TEST (std::has_nothrow_copy_constructor, long, true);
+    TEST (std::has_nothrow_copy_constructor, const long, true);
+    TEST (std::has_nothrow_copy_constructor, volatile long, true);
     TEST (std::has_nothrow_copy_constructor, long&, true);
-    TEST (std::has_nothrow_copy_constructor, long[2], true);
+    TEST (std::has_nothrow_copy_constructor, long [2], false);
 
+#if    defined (_RWSTD_TT_HAS_NOTHROW_COPY) \
+    || defined (_RWSTD_TT_HAS_TRIVIAL_COPY) \
+    || defined (_RWSTD_TT_IS_POD)
     TEST (std::has_nothrow_copy_constructor, struct_t, true);
+    TEST (std::has_nothrow_copy_constructor, const struct_t, true);
+    TEST (std::has_nothrow_copy_constructor, volatile struct_t, true);
+#else
+    rw_warn (0, 0, __LINE__,
+             "portions of test_has_nothrow_copy() have been "
+             "disabled due to lack of compiler support.");
+#endif
+
+    TEST (std::has_nothrow_copy_constructor, struct_t [2], false);
+
+#if defined (_RWSTD_TT_HAS_NOTHROW_COPY)
+    TEST (std::has_nothrow_copy_constructor, no_trivial_ctor_t, true);
+    TEST (std::has_nothrow_copy_constructor, no_trivial_copy_t, true);
+    TEST (std::has_nothrow_copy_constructor, no_trivial_assign_t, true);
+#else
+    rw_warn (0, 0, __LINE__,
+             "portions of test_has_nothrow_copy() have been "
+             "disabled due to lack of compiler support.");
+#endif
+
     TEST (std::has_nothrow_copy_constructor, throwing_copy_t, false);
 }
 
@@ -619,8 +913,16 @@
     TEST (std::has_virtual_destructor, polymorphic_t, true);
     TEST (std::has_virtual_destructor, public_derived_t<polymorphic_t>, true);
 
+#if    defined (_RWSTD_TT_HAS_VIRTUAL_DTOR) \
+    || defined (_RWSTD_TT_IS_CLASS) \
+    || defined (_RWSTD_TT_IS_UNION)
     TEST (std::has_virtual_destructor, non_polymorphic_t, false);
     TEST (std::has_virtual_destructor, public_derived_t<non_polymorphic_t>, false);
+#else
+    rw_warn (0, 0, __LINE__,
+             "portions of test_has_virtual_destructor() have been "
+             "disabled due to lack of compiler support.");
+#endif
 }
 
 static void test_is_signed ()
@@ -641,14 +943,20 @@
 
     TEST (std::is_signed, float, true);
     TEST (std::is_signed, double, true);
+
+#ifndef _RWSTD_NO_LONG_DOUBLE
     TEST (std::is_signed, long double, true);
+#endif
 
     TEST (std::is_signed, enum_t, false);
     TEST (std::is_signed, struct_t, false);
     TEST (std::is_signed, class_t, false);
     TEST (std::is_signed, union_t, false);
 
-    // add tests for references, pointers, arrays and functions
+    TEST (std::is_signed, long&, false);
+    TEST (std::is_signed, long*, false);
+    TEST (std::is_signed, long [2], false);
+    TEST (std::is_signed, long (), false);
 }
 
 static void test_is_unsigned ()
@@ -669,16 +977,69 @@
 
     TEST (std::is_unsigned, float, false);
     TEST (std::is_unsigned, double, false);
+
+#ifndef _RWSTD_NO_LONG_DOUBLE
     TEST (std::is_unsigned, long double, false);
+#endif
 
     TEST (std::is_unsigned, enum_t, false);
     TEST (std::is_unsigned, struct_t, false);
     TEST (std::is_unsigned, class_t, false);
     TEST (std::is_unsigned, union_t, false);
+
+    TEST (std::is_unsigned, unsigned long&, false);
+    TEST (std::is_unsigned, unsigned long*, false);
+    TEST (std::is_unsigned, unsigned long [2], false);
+    TEST (std::is_unsigned, unsigned long (), false);
 }
 
 static void test_alignment_of ()
 {
+#ifdef _RWSTD_NO_ALIGN_TRAITS
+
+    rw_warn (0, 0, __LINE__,
+             "test_alignment_of() disabled because "
+             "_RWSTD_NO_ALIGN_TRAITS is defined");
+
+#else 
+
+#  undef TEST
+#  define TEST(Trait,Type)                                           \
+     test_trait (__LINE__, #Trait, #Type,                            \
+                 Trait<Type>::value, _RWSTD_TT_ALIGN_OF(Type))
+
+    TEST (std::alignment_of, signed char);
+    TEST (std::alignment_of, signed short);
+    TEST (std::alignment_of, signed int);
+    TEST (std::alignment_of, signed long);
+
+    TEST (std::alignment_of, unsigned char);
+    TEST (std::alignment_of, unsigned short);
+    TEST (std::alignment_of, unsigned int);
+    TEST (std::alignment_of, unsigned long);
+
+#ifndef _RWSTD_NO_LONG_LONG
+    TEST (std::alignment_of, signed long long);
+    TEST (std::alignment_of, unsigned long long);
+#endif
+
+    TEST (std::alignment_of, float);
+    TEST (std::alignment_of, double);
+
+#ifndef _RWSTD_NO_LONG_DOUBLE 
+    TEST (std::alignment_of, long double);
+#endif
+
+    TEST (std::alignment_of, enum_t);
+    TEST (std::alignment_of, struct_t);
+    TEST (std::alignment_of, class_t);
+    TEST (std::alignment_of, union_t);
+    TEST (std::alignment_of, polymorphic_t);
+
+    TEST (std::alignment_of, void*);
+
+#  undef TEST
+#endif  // _RWSTD_TT_ALIGN_OF
 }
 
 static void test_rank ()
@@ -724,7 +1085,7 @@
 #undef TEST
 }
 
-static int run_test (int, char*[])
+static int run_test (int, char* [])
 {
     test_is_const ();
     test_is_volatile ();
@@ -757,7 +1118,7 @@
 
 /**************************************************************************/
 
-static int run_test (int, char*[])
+static int run_test (int, char* [])
 {
     rw_warn (0, 0, __LINE__,
              "test disabled because _RWSTD_NO_EXT_CXX_0X is defined");
@@ -768,7 +1129,7 @@
 
 /**************************************************************************/
 
-int main (int argc, char*argv[])
+int main (int argc, char* argv [])
 {
     return rw_test (argc, argv, __FILE__,
                     "meta.unary.prop",
diff --git a/tests/utilities/20.operators.cpp b/tests/utilities/20.operators.cpp
index 30a100f..4f6101c 100644
--- a/tests/utilities/20.operators.cpp
+++ b/tests/utilities/20.operators.cpp
@@ -397,7 +397,9 @@
 
     typedef RandomAccessIterator I;
 
-    RandomNumberGenerator<typename I::difference_type> rndgen;
+    typedef typename std::iterator_traits<I>::difference_type DiffT;
+
+    RandomNumberGenerator<DiffT> rndgen;
 
     std::random_shuffle (I (), I ());
     std::random_shuffle (I (), I (), rndgen);
diff --git a/tests/utilities/20.tuple.cnstr.cpp b/tests/utilities/20.tuple.cnstr.cpp
index 667ab3c..d54fa89 100644
--- a/tests/utilities/20.tuple.cnstr.cpp
+++ b/tests/utilities/20.tuple.cnstr.cpp
@@ -2,7 +2,7 @@
  *
  * 20.tuple.cnstr.cpp - tests exercising tuple constructors and operators
  *
- * $Id$
+ * $Id: 20.tuple.cnstr.cpp 677985 2008-07-18 18:05:55Z elemings $
  *
  ***************************************************************************
  *
@@ -22,39 +22,153 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 2008 Rogue Wave Software.
- * 
+ * Copyright 2008 Rogue Wave Software, Inc.
+ *
  **************************************************************************/
 
+#include <rw_driver.h>
+
+// compile out all test code if extensions disabled
+#if    !defined (_RWSTD_NO_EXT_CXX_0X) \
+    && !defined(_RWSTD_NO_RVALUE_REFERENCES)
+
+#include <climits>              // for CHAR_MAX
+#include <cstdlib>              // for rand
+#include <cstring>              // for strcmp
 #include <tuple>
+#include <type_traits>          // for decay
+
+#include <rw_valcmp.h>          // for rw_fltcmp
+#include <rw_allocator.h>       // for UserAlloc
 
 #include "20.tuple.h"
 
 /**************************************************************************/
 
-#include <rw_driver.h>
+// general test function and underlying abstractions
+
+template <class T, class U = T>
+bool equal (const T& x, const U& y)
+{
+    return x == y;
+}
+
+template <>
+bool equal (const float& x, const float& y)
+{
+    return 0 == rw_fltcmp (x, y);
+}
+
+template <>
+bool equal (const char* const& x, const char* const& y)
+{
+    return 0 == std::strcmp (x, y);
+}
+
+
+template <class T, class U>
+void assert (int line, unsigned index, const char* tuple_name,
+             const T& t, const U& u)
+{
+    const char* fmtT = FMT_SPEC (T);
+    const char* fmtU = FMT_SPEC (U);
+    rw_assert (equal (t, u), __FILE__, line,
+               "get<%d, %s> (); got %{@}, expected %{@}",
+               index, tuple_name, fmtT, t, fmtU, u);
+}
+
+void assert (int line, unsigned index, const char* tuple_name,
+             const UserDefined& t, const UserDefined& u)
+{
+    rw_assert (equal (t, u), __FILE__, line,
+               "get<%d, %s> (); got %p [%d], expected %p [%d]",
+               index, tuple_name, &t, t.value (), &u, u.value ());
+
+    UserDefined::size_type a, e;
+
+#undef CHECK
+#define CHECK(N)          \
+    a = UserDefined::actual.N; e = UserDefined::expect.N; \
+    rw_assert (a == e, __FILE__, line, \
+               "UserDefined::" #N "; got %u, expected %u", a, e)
+
+    CHECK (dflt_ctor);
+    CHECK (copy_ctor);
+    CHECK (tmpl_ctor);
+    CHECK (move_ctor);
+    CHECK (copy_asgn);
+    CHECK (tmpl_asgn);
+    CHECK (move_asgn);
+}
+
+template <class T, class U>
+void assert (int line, unsigned index, const char* tuple_name,
+             const std::tuple<T>& t, const std::tuple<U>& u)
+{
+    const char* fmtT = FMT_SPEC (T);
+    const char* fmtU = FMT_SPEC (U);
+    rw_assert (equal (t, u), __FILE__, line,
+               "get<%d, %s> (); got %{@}, expected %{@}",
+               index, tuple_name,
+               fmtT, std::get<0> (t), fmtU, std::get<0> (u));
+}
+
+
+template <unsigned Index, class Tuple, class... Elements>
+/*static*/ void
+test_impl (int line, const Tuple& tuple, const Elements&... values);
+
+// terminating specialization
+template <unsigned Index, class Tuple>
+/*static*/ void
+test_impl (int, const Tuple&) {}
+
+// generic definition
+template <unsigned Index, class Tuple, class Element, class... Elements>
+/*static*/ void
+test_impl (int line, const Tuple& tuple,
+           const Element& value, const Elements&... values)
+{
+    // assume std::get() has been fully tested and works correctly
+    assert (line, Index, TYPE_NAME (Tuple),
+            std::get<Index> (tuple), value);
+
+    test_impl<Index+1> (line, tuple, values...);
+}
+
+template <class Tuple, class... Elements>
+/*static*/ void
+test (int line, const Tuple& tuple, const Elements&... values)
+{
+    test_impl<0> (line, tuple, values...);
+}
+
+/**************************************************************************/
 
 static void
 test_default_ctor ()
 {
     rw_info (0, __FILE__, __LINE__, "default constructor");
 
-    EmptyTuple et; _RWSTD_UNUSED (et);
-    IntTuple it; _RWSTD_UNUSED (it);
-    ConstIntTuple ct; _RWSTD_UNUSED (ct);
-    PairTuple pt; _RWSTD_UNUSED (pt);
-    NestedTuple nt; _RWSTD_UNUSED (nt);
-    BigTuple bt; _RWSTD_UNUSED (bt);
+    std::tuple<> et; _RWSTD_UNUSED (et);
+    // TODO: enable this test after implementing empty space optimization
+    //rw_assert (sizeof (et) == 0, __FILE__, __LINE__,
+                 //"sizeof (std::tuple<>); got %u, expected 0",
+                 //sizeof (et));
 
-    UserClass::reset_totals ();
-    UserTuple ut; _RWSTD_UNUSED (ut);
+    std::tuple<int> it; _RWSTD_UNUSED (it);
+    std::tuple<const int> ct; _RWSTD_UNUSED (ct);
+    // ill-formed for tuples with element types containing references
+    std::tuple<long, const char*> pt; _RWSTD_UNUSED (pt);
+    std::tuple<std::tuple<int> > nt; _RWSTD_UNUSED (nt);
+    std::tuple<bool, char, int, double, void*, UserDefined> bt;
+    _RWSTD_UNUSED (bt);
 
-    rw_assert (1 == UserClass::n_total_def_ctor_, __FILE__, __LINE__,
-               "tuple<UserClass>::tuple() called %d default ctors, "
-               "expected 1", UserClass::n_total_def_ctor_);
-    rw_assert (0 == UserClass::n_total_copy_ctor_, __FILE__, __LINE__,
-               "tuple<UserClass>::tuple() called %d copy ctors, "
-               "expected 0", UserClass::n_total_copy_ctor_);
+    UserDefined::reset ();
+    std::tuple<UserDefined> ut; _RWSTD_UNUSED (ut);
+    rw_assert (1 == UserDefined::actual.dflt_ctor, __FILE__, __LINE__,
+               "std::tuple<UserDefined> ut; called %d default ctors, "
+               "expected 1", UserDefined::actual.dflt_ctor);
 }
 
 /**************************************************************************/
@@ -64,29 +178,40 @@
 {
     rw_info (0, __FILE__, __LINE__, "value copy constructor");
 
-    const int i = 1;
-    const IntTuple it (i);
-    ConstIntTuple ct (i); _RWSTD_UNUSED (ct);
-    NestedTuple nt (it);
+    const int i = std::rand ();
+    std::tuple<int> it1 (i);
+    test (__LINE__, it1, i);
 
-    const long l = 1;
-    const char* s = "string";
-    PairTuple pt (l, s);
+    const std::tuple<int> it2 (i);
+    test (__LINE__, it2, i);
 
-    UserClass::reset_totals ();
-    const UserClass uc;
-    UserTuple ut (uc); _RWSTD_UNUSED (ut);
+    std::tuple<const int> ct (i);
+    test (__LINE__, ct, i);
 
-    rw_assert (1 == UserClass::n_total_def_ctor_, __FILE__, __LINE__,
-               "tuple<UserClass>::tuple() called %d default ctors, "
-               "expected 1", UserClass::n_total_def_ctor_);
-    rw_assert (1 == UserClass::n_total_copy_ctor_, __FILE__, __LINE__,
-               "tuple<UserClass>::tuple() called %d copy ctors, "
-               "expected 1", UserClass::n_total_copy_ctor_);
+    int j = std::rand ();
+    const std::tuple<int&> rt (j);
+    test (__LINE__, rt, j);
+
+    std::tuple<std::tuple<int> > nt (it2);
+    //std::get<0> (it2) = std::rand (); // diliberately cause assertion
+    test (__LINE__, nt, it2);
+
+    const long l = std::rand ();
+    std::tuple<long, const char*> pt (l, "string");
+    test (__LINE__, pt, l, (const char*) "string");
+
+    const UserDefined ud (i);
+    UserDefined::reset ();
+    std::tuple<UserDefined> ut (ud);
+    UserDefined::expect.copy_ctor = 1;
+    test (__LINE__, ut, ud);
 
     const bool b = true; const char c = 'a';
-    const double d = 1.2; void* const p = 0;
-    BigTuple bt (b, c, i, d, p, uc); _RWSTD_UNUSED (bt);
+    const double d = 3.14159; void* const p = (void*) &i;
+    std::tuple<bool, char, int, double, void*, UserDefined>
+        bt (b, c, i, d, p, ud);
+    ++UserDefined::expect.copy_ctor;
+    test (__LINE__, bt, b, c, i, d, p, ud);
 }
 
 /**************************************************************************/
@@ -96,23 +221,48 @@
 {
     rw_info (0, __FILE__, __LINE__, "value move constructor");
 
-    IntTuple it (1); //_RWSTD_UNUSED (it);
-    ConstIntTuple ct (1); _RWSTD_UNUSED (ct);
-    PairTuple pt (1L, "string"); _RWSTD_UNUSED (pt);
-    //NestedTuple nt (it); _RWSTD_UNUSED (nt);
+#define INTEGER_CONSTANT        256
 
-    BigTuple bt (true, 'a', 1, 1.0, (void*)0, UserClass ());
-    _RWSTD_UNUSED (bt);
+    std::tuple<int> it1 (INTEGER_CONSTANT);
+    test (__LINE__, it1, INTEGER_CONSTANT);
+    const int c = std::rand ();
+    int i = c;   // move semantics can alter source value
+    std::tuple<int> it2 (i);   // temporary source value
+    test (__LINE__, it2, c);
 
-    UserClass::reset_totals ();
-    UserTuple ut (UserClass ()); _RWSTD_UNUSED (ut);
+    const std::tuple<int> it3 (INTEGER_CONSTANT);
+    test (__LINE__, it3, INTEGER_CONSTANT);
+    i = c;
+    const std::tuple<int> it4 (i);
+    test (__LINE__, it4, c);
 
-    rw_assert (0 == UserClass::n_total_def_ctor_, __FILE__, __LINE__,
-               "tuple<UserClass>::tuple() called %d default ctors, "
-               "expected 0", UserClass::n_total_def_ctor_);
-    rw_assert (0 == UserClass::n_total_copy_ctor_, __FILE__, __LINE__,
-               "tuple<UserClass>::tuple() called %d copy ctors, "
-               "expected 0", UserClass::n_total_copy_ctor_);
+    std::tuple<const int> ct1 (INTEGER_CONSTANT);
+    test (__LINE__, ct1, INTEGER_CONSTANT);
+    i = c;
+    std::tuple<const int> ct2 (i);
+    test (__LINE__, ct2, c);
+
+    // ill-formed for tuples with element types containing references
+
+    std::tuple<std::tuple<int> > nt (it1);
+    test (__LINE__, nt, it1);
+
+    std::tuple<long, const char*> pt (123456789L, "string");
+    test (__LINE__, pt, 123456789L, (const char*) "string");
+
+    const UserDefined src (c);
+    UserDefined tmp (src);
+    UserDefined::reset ();
+    std::tuple<UserDefined> ut (tmp);
+    UserDefined::expect.move_ctor = 1;
+    test (__LINE__, ut, src);
+
+    tmp = src;  ++UserDefined::expect.copy_asgn;
+    std::tuple<bool, char, int, double, void*, UserDefined>
+        bt (true, 'a', INTEGER_CONSTANT, 3.14159, (void*) 0, tmp);
+    ++UserDefined::expect.move_ctor;
+    test (__LINE__, bt,
+          true, 'a', INTEGER_CONSTANT, 3.14159, (void*) 0, src);
 }
 
 /**************************************************************************/
@@ -123,34 +273,44 @@
     rw_info (0, __FILE__, __LINE__,
              "copy constructor (homogenous tuples)");
 
-    EmptyTuple et1, et2 (et1);
+    std::tuple<> et1, et2 (et1);
     _RWSTD_UNUSED (et2);
 
-    const IntTuple it1;
-    IntTuple it2 (it1); _RWSTD_UNUSED (it2);
+    const int ci = std::rand ();
+    const std::tuple<int> it1 (ci);
+    std::tuple<int> it2 (it1);
+    test (__LINE__, it2, ci);
 
-    const ConstIntTuple ct1;
-    ConstIntTuple ct2 (ct1); _RWSTD_UNUSED (ct2);
+    const std::tuple<const int>& ct1 = it1; // same as copy ctor
+    std::tuple<const int> ct2 (ct1);
+    test (__LINE__, ct2, ci);
 
-    PairTuple pt1;
-    PairTuple pt2 (pt1); _RWSTD_UNUSED (pt2);
+    int i = ci;
+    const std::tuple<int&> rt1 (i);
+    std::tuple<int&> rt2 (rt1);
+    test (__LINE__, rt2, ci);
 
-    const NestedTuple nt1;
-    NestedTuple nt2 (nt1); _RWSTD_UNUSED (nt2);
+    const std::tuple<std::tuple<int> > nt1 (it1);
+    std::tuple<std::tuple<int> > nt2 (nt1);
+    test (__LINE__, nt2, it1);
 
-    UserClass::reset_totals ();
-    const UserTuple ut1; UserTuple ut2 (ut1);
-    _RWSTD_UNUSED (ut1);
+    const std::tuple<long, const char*> pt1 (1234567890L, "string");
+    std::tuple<long, const char*> pt2 (pt1);
+    test (__LINE__, pt2, 1234567890L, (const char*) "string");
 
-    rw_assert (1 == UserClass::n_total_def_ctor_, __FILE__, __LINE__,
-               "tuple<UserClass>::tuple() called %d default ctors, "
-               "expected 1", UserClass::n_total_def_ctor_);
-    rw_assert (1 == UserClass::n_total_copy_ctor_, __FILE__, __LINE__,
-               "tuple<UserClass>::tuple() called %d copy ctors, "
-               "expected 1", UserClass::n_total_copy_ctor_);
+    UserDefined ud (ci);
+    const std::tuple<UserDefined> ut1 (ud);
+    UserDefined::reset ();
+    std::tuple<UserDefined> ut2 (ut1);
+    ++UserDefined::expect.copy_ctor;
+    test (__LINE__, ut2, ud);
 
-    const BigTuple bt1; BigTuple bt2 (bt1);
-    _RWSTD_UNUSED (bt1); _RWSTD_UNUSED (bt2);
+    const std::tuple<bool, char, int, double, void*, UserDefined>
+        bt1 (true, 'a', ci, 3.14159, (void* const) &i, ud);
+    ++UserDefined::expect.move_ctor; // moved ud to bt1
+    std::tuple<bool, char, int, double, void*, UserDefined> bt2 (bt1);
+    ++UserDefined::expect.copy_ctor; // copied to bt2
+    test (__LINE__, bt2, true, 'a', ci, 3.14159, (void* const) &i, ud);
 }
 
 /**************************************************************************/
@@ -161,21 +321,40 @@
     rw_info (0, __FILE__, __LINE__,
              "move constructor (homogenous tuples)");
 
-    EmptyTuple et (EmptyTuple ()); _RWSTD_UNUSED (et);
-    IntTuple it (IntTuple ()); _RWSTD_UNUSED (it);
-    ConstIntTuple ct (ConstIntTuple ()); _RWSTD_UNUSED (ct);
-    PairTuple pt (PairTuple ()); _RWSTD_UNUSED (pt);
-    NestedTuple nt (NestedTuple ()); _RWSTD_UNUSED (nt);
-    BigTuple bt (BigTuple ());
+    std::tuple<> et (std::tuple<> ()); _RWSTD_UNUSED (et);
 
-    UserClass::reset_totals ();
-    UserTuple ut (UserTuple ());
-    rw_assert (0 == UserClass::n_total_def_ctor_, __FILE__, __LINE__,
-               "tuple<UserClass>::tuple() called %d default ctors, "
-               "expected 0", UserClass::n_total_def_ctor_);
-    rw_assert (0 == UserClass::n_total_copy_ctor_, __FILE__, __LINE__,
-               "tuple<UserClass>::tuple() called %d copy ctors, "
-               "expected 0", UserClass::n_total_copy_ctor_);
+    const int ci = std::rand ();
+
+    std::tuple<int> it1 (ci);
+    std::tuple<int> it2 (std::move (it1));
+    test (__LINE__, it2, ci);
+
+    std::tuple<const int> ct1 (ci);
+    std::tuple<const int> ct2 = std::move (ct1);
+    test (__LINE__, ct2, ci);
+
+    std::tuple<std::tuple<int> > nt1 (it1);
+    std::tuple<std::tuple<int> > nt2 = std::move (nt1);
+    test (__LINE__, nt2, it1);
+
+    std::tuple<long, const char*> pt1 (1234567890L, "string");
+    std::tuple<long, const char*> pt2 (std::move (pt1));
+    test (__LINE__, pt2, 1234567890L, (const char*) "string");
+
+    const UserDefined ud (ci);
+    std::tuple<UserDefined> ut1 (ud);
+    UserDefined::reset ();
+    std::tuple<UserDefined> ut2 (std::move (ut1));
+    ++UserDefined::expect.move_ctor;
+    test (__LINE__, ut2, ud);
+
+    std::tuple<bool, char, int, double, void*, UserDefined>
+        bt1 (true, 'a', ci, 3.14159, (void*) &ci, ud);
+    ++UserDefined::expect.copy_ctor;
+    std::tuple<bool, char, int, double, void*, UserDefined>
+        bt2 (std::move (bt1));
+    ++UserDefined::expect.move_ctor;
+    test (__LINE__, bt2, true, 'a', ci, 3.14159, (void*) &ci, ud);
 }
 
 /**************************************************************************/
@@ -186,24 +365,49 @@
     rw_info (0, __FILE__, __LINE__,
              "copy assignment operator (homogenous tuples)");
 
-    EmptyTuple et1, et2; et2 = et1;
-    IntTuple it1, it2; it2 = it1;
-    //ConstIntTuple ct1, ct2; ct2 = ct1;  // Can't assign to const element.
-    PairTuple pt1, pt2; pt2 = pt1;
-    NestedTuple nt1, nt2; nt2 = nt1;
-    BigTuple bt1, bt2; bt2 = bt1;
+    const std::tuple<> et1 = std::tuple<> ();
+    std::tuple<> et2;
+    et2 = et1;
+    _RWSTD_UNUSED (et2);
 
-    UserClass::reset_totals ();
-    UserTuple ut1, ut2; ut1 = ut2;
-    rw_assert (2 == UserClass::n_total_def_ctor_, __FILE__, __LINE__,
-               "tuple<UserClass>::tuple() called %d default ctors, "
-               "expected 2", UserClass::n_total_def_ctor_);
-    rw_assert (0 == UserClass::n_total_copy_ctor_, __FILE__, __LINE__,
-               "tuple<UserClass>::tuple() called %d copy ctors, "
-               "expected 0", UserClass::n_total_copy_ctor_);
-    rw_assert (1 == UserClass::n_total_op_assign_, __FILE__, __LINE__,
-               "tuple<UserClass>::tuple() called %d assign ops, "
-               "expected 1", UserClass::n_total_op_assign_);
+    int i = std::rand ();
+    const std::tuple<int> it1 (i);
+    std::tuple<int> it2;
+    it2 = it1;
+    test (__LINE__, it2, i);
+
+    // copy assignment ill-formed for constant element types
+
+    const std::tuple<int&> rt1 (i);
+    int j = -1; // outside range of rand()
+    std::tuple<int&> rt2 (j); // note, different reference
+    rt2 = rt1;
+    test (__LINE__, rt2, i);
+
+    std::tuple<std::tuple<int> > nt1 (it1);
+    std::tuple<std::tuple<int> > nt2;
+    nt2 = nt1;
+    test (__LINE__, nt2, it1);
+
+    const std::tuple<long, const char*> pt1 (long (i), "string");
+    std::tuple<long, const char*> pt2;
+    pt2 = pt1;
+    test (__LINE__, pt2, long (i), (const char*) "string");
+
+    const UserDefined ud (i);
+    const std::tuple<UserDefined> ut1 (ud);
+    std::tuple<UserDefined> ut2;
+    UserDefined::reset ();
+    ut2 = ut1;  ++UserDefined::expect.copy_asgn;
+    test (__LINE__, ut2, ud);
+
+    const std::tuple<bool, char, int, double, void*, UserDefined>
+        bt1 (true, 'a', i, 3.14159, (void* const) &i, ud);
+    ++UserDefined::expect.copy_ctor;
+    std::tuple<bool, char, int, double, void*, UserDefined> bt2;
+    ++UserDefined::expect.dflt_ctor;
+    bt2 = bt1;  ++UserDefined::expect.copy_asgn;
+    test (__LINE__, bt2, true, 'a', i, 3.14159, (void* const) &i, ud);
 }
 
 /**************************************************************************/
@@ -214,45 +418,82 @@
     rw_info (0, __FILE__, __LINE__,
              "move assignment operator (homogenous tuples)");
 
-    EmptyTuple et1, et2; et2 = et1;
-    IntTuple it1, it2; it2 = it1;
-    //ConstIntTuple ct1, ct2; ct2 = ct1;  // Can't assign to const element.
-    PairTuple pt1, pt2; pt2 = pt1;
-    NestedTuple nt1, nt2; nt2 = nt1;
-    BigTuple bt1, bt2; bt2 = bt1;
+    std::tuple<> et1, et2;
+    et2 = std::move (et1);
+    _RWSTD_UNUSED (et2);
 
-    UserClass::reset_totals ();
-    UserTuple ut1, ut2; ut1 = ut2;
-    rw_assert (2 == UserClass::n_total_def_ctor_, __FILE__, __LINE__,
-               "tuple<UserClass>::tuple() called %d default ctors, "
-               "expected 2", UserClass::n_total_def_ctor_);
-    rw_assert (0 == UserClass::n_total_copy_ctor_, __FILE__, __LINE__,
-               "tuple<UserClass>::tuple() called %d copy ctors, "
-               "expected 0", UserClass::n_total_copy_ctor_);
-    rw_assert (1 == UserClass::n_total_op_assign_, __FILE__, __LINE__,
-               "tuple<UserClass>::tuple() called %d assign ops, "
-               "expected 1", UserClass::n_total_op_assign_);
+    int i = std::rand ();
+
+    std::tuple<int> it1 (i);
+    std::tuple<int> it2;
+    it2 = std::move (it1);
+    test (__LINE__, it2, i);
+
+    // move assignment ill-formed for constant element types
+
+    std::tuple<std::tuple<int> > nt1 (it2);
+    std::tuple<std::tuple<int> > nt2;
+    nt2 = std::move (nt1);
+    test (__LINE__, nt2, it2);
+
+    std::tuple<long, const char*> pt1 (1234567890L, "string");
+    std::tuple<long, const char*> pt2;
+    pt2 = std::move (pt1);
+    test (__LINE__, pt2, 1234567890L, (const char*) "string");
+
+    const UserDefined ud (i);
+    std::tuple<UserDefined> ut1 (ud);
+    std::tuple<UserDefined> ut2;
+    UserDefined::reset ();
+    ut2 = std::move (ut1);  ++UserDefined::expect.move_asgn;
+    test (__LINE__, ut2, ud);
+
+    std::tuple<bool, char, int, double, void*, UserDefined>
+        bt1 (true, 'a', i, 3.14159, (void* const) &i, ud);
+    std::tuple<bool, char, int, double, void*, UserDefined> bt2;
+    UserDefined::reset ();
+    bt2 = std::move (bt1);  ++UserDefined::expect.move_asgn;
+    test (__LINE__, bt2, true, 'a', i, 3.14159, (void* const) &i, ud);
 }
 
 /**************************************************************************/
 
+// heterogenous tests do not apply to empty tuples so no tests required
+
+#include <string>
+
+// need a string class with implicit conversion to type `const char*'
+struct String: public std::string
+{
+    String (): std::string () {}
+    String (const char* s): std::string (s) {}
+    operator const char* () const { return this->data (); }
+};
+
+
 static void
 test_hetero_copy_ctor ()
 {
     rw_info (0, __FILE__, __LINE__,
              "copy constructor (heterogenous tuples)");
 
-    const int i1 = 0; const char c = 'a'; const double d = 1.2;
-    void* const p = 0; UserClass uc;
-    BigTuple bt1 (i1, c, i1, d, p, uc); _RWSTD_UNUSED (bt1);
+    int i = std::rand () % CHAR_MAX;
 
-    const bool b = true; const int i2 = 'a';
-    BigTuple bt2 (b, i2, i1, d, p, uc); _RWSTD_UNUSED (bt2);
+    const std::tuple<char> cit (static_cast<char> (i));
+    std::tuple<int> it (cit);
+    test (__LINE__, it, i);
 
-    const float f = 1.2;
-    BigTuple bt3 (b, c, i1, f, p, uc); _RWSTD_UNUSED (bt3);
+    std::tuple<unsigned, String> cpt (12345U, "string");
+    std::tuple<long, const char*> pt (cpt);
+    test (__LINE__, pt, 12345U, (const char*) "string");
 
-    //UserTuple
+    char s [] = "string"; const UserDefined ud (i);
+    const std::tuple<int, int, short, float, char*, UserDefined>
+        cbt (int (true), int ('a'), short (i), 3.14159f, s, ud);
+    UserDefined::reset ();
+    std::tuple<bool, char, int, double, void*, UserDefined> bt (cbt);
+    ++UserDefined::expect.copy_ctor;
+    test (__LINE__, bt, true, 'a', i, 3.14159f, s, ud);
 }
 
 /**************************************************************************/
@@ -263,14 +504,24 @@
     rw_info (0, __FILE__, __LINE__,
              "move constructor (heterogenous tuples)");
 
-    //EmptyTuple
-    //IntTuple
-    //ConstIntTuple;
-    //PairTuple
-    //NestedTuple
+    int i = std::rand () % CHAR_MAX;
 
-    //UserTuple
-    // BigTuple
+    std::tuple<char> cit (static_cast<char> (i));
+    std::tuple<int> it (std::move (cit));
+    test (__LINE__, it, i);
+
+    std::tuple<unsigned, String> cpt (12345U, "string");
+    std::tuple<long, const char*> pt (std::move (cpt));
+    test (__LINE__, pt, 12345U, (const char*) "string");
+
+    char s [] = "string"; const UserDefined ud (i);
+    std::tuple<int, int, short, float, char*, UserDefined>
+        cbt (int (true), int ('a'), short (i), 3.14159f, s, ud);
+    UserDefined::reset ();
+    std::tuple<bool, char, int, double, void*, UserDefined>
+        bt (std::move (cbt));
+    ++UserDefined::expect.move_ctor;
+    test (__LINE__, bt, true, 'a', i, 3.14159f, s, ud);
 }
 
 /**************************************************************************/
@@ -281,14 +532,25 @@
     rw_info (0, __FILE__, __LINE__,
              "copy assignment operator (heterogenous tuples)");
 
-    //EmptyTuple
-    //IntTuple
-    //ConstIntTuple;
-    //PairTuple
-    //NestedTuple
+    int i = std::rand () % CHAR_MAX;
 
-    //UserTuple
-    // BigTuple
+    std::tuple<char> cit (static_cast<char> (i));
+    std::tuple<int> it;
+    it = cit;
+    test (__LINE__, it, i);
+
+    std::tuple<unsigned, String> cpt (12345U, "string");
+    std::tuple<long, const char*> pt;
+    pt = cpt;
+    test (__LINE__, pt, 12345U, (const char*) "string");
+
+    char s [] = "string"; const UserDefined ud (i);
+    std::tuple<int, int, short, float, char*, UserDefined>
+        cbt (int (true), int ('a'), short (i), 3.14159f, s, ud);
+    std::tuple<bool, char, int, double, void*, UserDefined> bt;
+    UserDefined::reset ();
+    bt = cbt;  ++UserDefined::expect.copy_asgn;
+    test (__LINE__, bt, true, 'a', i, 3.14159f, s, ud);
 }
 
 /**************************************************************************/
@@ -299,20 +561,30 @@
     rw_info (0, __FILE__, __LINE__,
              "move assignment operator (heterogenous tuples)");
 
-    //EmptyTuple
-    //IntTuple
-    //ConstIntTuple;
-    //PairTuple
-    //NestedTuple
+    int i = std::rand () % CHAR_MAX;
 
-    //UserTuple
-    // BigTuple
+    std::tuple<char> cit (i);
+    std::tuple<int> it;
+    it = std::move (cit);
+    test (__LINE__, it, i);
+
+    std::tuple<unsigned, String> cpt (12345U, "string");
+    std::tuple<long, const char*> pt;
+    pt = std::move (cpt);
+    test (__LINE__, pt, 12345U, (const char*) "string");
+
+    char s [] = "string"; const UserDefined ud (i);
+    std::tuple<int, int, short, float, char*, UserDefined>
+        cbt (int (true), int ('a'), short (i), 3.14159f, s, ud);
+    std::tuple<bool, char, int, double, void*, UserDefined> bt;
+    ++UserDefined::expect.move_ctor;
+    UserDefined::reset ();
+    bt = std::move (cbt);  ++UserDefined::expect.move_asgn;
+    test (__LINE__, bt, true, 'a', i, 3.14159f, s, ud);
 }
 
 /**************************************************************************/
 
-#include <rw_allocator.h>           // for UserAlloc
-
 static void
 test_alloc_ctors ()
 {
@@ -324,7 +596,7 @@
 /**************************************************************************/
 
 static int
-run_test (int /*unused*/, char* /*unused*/ [])
+run_test (int /*argc*/, char* /*argv*/ [])
 {
     test_default_ctor ();
 
@@ -346,6 +618,29 @@
     return 0;
 }
 
+#else // _RWSTD_NO_EXT_CXX_0X || _RWSTD_NO_RVALUE_REFERENCES
+
+static int
+run_test (int, char*[])
+{
+#if defined (_RWSTD_NO_EXT_CXX_OX)
+
+    rw_warn (0, 0, __LINE__,
+             "test disabled because _RWSTD_NO_EXT_CXX_0X is defined");
+
+#elif defined (_RWSTD_NO_RVALUE_REFERENCES)
+
+    rw_warn (0, 0, __LINE__,
+             "test disabled because _RWSTD_NO_RVALUE_REFERENCES is "
+             "defined");
+
+#endif
+
+    return 0;
+}
+
+#endif // _RWSTD_NO_EXT_CXX_0X || _RWSTD_NO_RVALUE_REFERENCES
+
 /*extern*/ int
 main (int argc, char* argv [])
 {
diff --git a/tests/utilities/20.tuple.creation.cpp b/tests/utilities/20.tuple.creation.cpp
new file mode 100644
index 0000000..bcf9088
--- /dev/null
+++ b/tests/utilities/20.tuple.creation.cpp
@@ -0,0 +1,149 @@
+/***************************************************************************
+ *
+ * 20.tuple.creation.cpp - tests exercising tuple creation functions
+ *
+ * $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.
+ *
+ **************************************************************************/
+
+#include <rw_driver.h>
+
+// compile out all test code if extensions disabled
+#if    !defined(_RWSTD_NO_EXT_CXX_0X) \
+    && !defined(_RWSTD_NO_RVALUE_REFERENCES)
+
+#include <functional>           // for reference_wrapper
+#include <tuple>
+
+#include "20.tuple.h"
+
+/**************************************************************************/
+
+typedef std::reference_wrapper<int>         IntRefWrap;
+
+static void
+test_make_tuple ()
+{
+    rw_info (0, __FILE__, __LINE__, "make_tuple");
+
+    std::tuple<int> it1 = std::make_tuple (1);
+
+    int i = 2;
+    std::tuple<int, int> it2 = std::make_tuple (1, i);
+
+    const int j = 3;
+    std::tuple<int, int, int> it3 = std::make_tuple (1, i, j);
+
+    std::tuple<int&> rt1 = std::make_tuple (std::ref (i));
+
+    std::tuple<const int&> rt2 = std::make_tuple (std::cref (i));
+}
+
+/**************************************************************************/
+
+#include <cstring>
+
+static void
+test_tie ()
+{
+    rw_info (0, __FILE__, __LINE__, "tie");
+
+    int i = 0; double d = 0.0; const char* s = 0;
+    std::tie (i, std::ignore, s)
+        = std::make_tuple (256, 3.14159, "string");
+
+    rw_assert (i == 256, __FILE__, __LINE__,
+               "i == 256, got false, expected true");
+    rw_assert (d == 0.0, __FILE__, __LINE__,
+               "d == 0.0, got false, expected true");
+    rw_assert (0 == std::strcmp (s, "string"), __FILE__, __LINE__,
+               "s == \"string\", got false, expected true");
+}
+
+/**************************************************************************/
+
+static void
+test_tuple_cat ()
+{
+    rw_info (0, __FILE__, __LINE__, "tuple_cat");
+
+#define FirstHalf       bool, char, int, double
+#define SecondHalf      void*, UserDefined
+
+    typedef std::tuple<FirstHalf>   FirstTuple;
+    FirstTuple t1 (true, 'a', 256, 3.14159);
+
+    typedef std::tuple<SecondHalf>  SecondTuple;
+    SecondTuple t2 (&t1, UserDefined ());
+
+    typedef std::tuple<FirstHalf, SecondHalf>   WholeTuple;
+    //WholeTuple t3 (tuple_cat (t1, t2));
+}
+
+/**************************************************************************/
+
+static int
+run_test (int /*argc*/, char* /*argv*/ [])
+{
+    const void* p = _RWSTD_STATIC_CAST (const void*, &std::ignore);
+    _RWSTD_UNUSED (p);
+
+    test_make_tuple ();
+    test_tie ();
+    test_tuple_cat ();
+
+    return 0;
+}
+
+#else // _RWSTD_NO_EXT_CXX_0X || _RWSTD_NO_RVALUE_REFERENCES
+
+static int
+run_test (int, char*[])
+{
+#if defined (_RWSTD_NO_EXT_CXX_0X)
+
+    rw_warn (0, 0, __LINE__,
+             "test disabled because _RWSTD_NO_EXT_CXX_0X is defined");
+
+#elif defined (_RWSTD_NO_RVALUE_REFERENCES)
+
+    rw_warn (0, 0, __LINE__,
+	         "test disabled because _RWSTD_NO_RVALUE_REFERENCES is "
+			 "defined");
+
+#endif
+
+    return 0;
+}
+
+#endif // _RWSTD_NO_EXT_CXX_0X || _RWSTD_NO_RVALUE_REFERENCES
+
+/*extern*/ int
+main (int argc, char* argv [])
+{
+    return rw_test (argc, argv, __FILE__,
+                    "[tuple.creation]",
+                    "20.3.1.3  Tuple creation functions",
+                    run_test, "", 0);
+}
+
diff --git a/tests/utilities/20.tuple.elem.cpp b/tests/utilities/20.tuple.elem.cpp
index 8bfbedc..26777e5 100644
--- a/tests/utilities/20.tuple.elem.cpp
+++ b/tests/utilities/20.tuple.elem.cpp
@@ -2,7 +2,7 @@
  *
  * 20.tuple.elem.cpp - tests exercising tuple element accessors
  *
- * $Id$
+ * $Id: 20.tuple.elem.cpp 677985 2008-07-18 18:05:55Z elemings $
  *
  ***************************************************************************
  *
@@ -11,7 +11,7 @@
  * 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
+ * except in  compliance with the License.   You may otain  a copy of
  * the License at
  *
  * http://www.apache.org/licenses/LICENSE-2.0
@@ -22,54 +22,166 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 2008 Rogue Wave Software.
- * 
+ * Copyright 2008 Rogue Wave Software, Inc.
+ *
  **************************************************************************/
 
+#include <rw_driver.h>
+
+// compile out all test code if extensions disabled
+#if    !defined (_RWSTD_NO_EXT_CXX_0X) \
+    && !defined (_RWSTD_NO_RVALUE_REFERENCES)
+
 #include <tuple>
 
 #include "20.tuple.h"
 
 /**************************************************************************/
 
-#include <rw_driver.h>
+#include <rw_valcmp.h>
+
+#define BOOL_VAL    true
+#define CHAR_VAL    'a'
+#define INT_VAL     256
+#define DBL_VAL     3.14159
+#define PTR_VAL     ptr_val
+#define USER_VAL    user_val
+
+static void*        ptr_val;
+static UserDefined  user_val;
+
+typedef std::tuple<bool, char, int, double, void*, UserDefined> Tuple;
 
 static void
-test_get ()
+test_const_get (const Tuple& t)
 {
-    rw_info (0, __FILE__, __LINE__, "get");
+    rw_info (0, __FILE__, __LINE__, "get (const)");
 
-    IntTuple it (4);
-    rw_assert (std::get<0> (it) == 4, __FILE__, __LINE__,
-               "get<0> (it), got %d, expected 4", std::get<0> (it));
+    const bool& b = std::get<0> (t);
+    rw_assert (b == BOOL_VAL, __FILE__, __LINE__, "get<0>(t), got %s, "
+               "expected %s", b? "true": "false", BOOL_VAL? "true": "false");
+
+    const char& c = std::get<1> (t);
+    rw_assert (c == CHAR_VAL, __FILE__, __LINE__,
+               "get<1>(t), got \'%c\', expected \'%c\'", c, CHAR_VAL);
+
+    const int& i = std::get<2> (t);
+    rw_assert (i == INT_VAL, __FILE__, __LINE__,
+               "get<2>(t), got %d, expected %d", i, INT_VAL);
+
+    const double& d = std::get<3> (t);
+    rw_assert (0 == rw_dblcmp (d, DBL_VAL), __FILE__, __LINE__,
+               "get<3>(t), got %f, expected %f", d, DBL_VAL);
+
+    void* const& p = std::get<4> (t);
+    rw_assert (p == PTR_VAL, __FILE__, __LINE__,
+               "get<4>(t), got %p, expected %p", p, PTR_VAL);
+
+    const UserDefined& uc = std::get<5> (t);
+    rw_assert (uc == USER_VAL, __FILE__, __LINE__,
+               "get<5>(t), got %d, expected %d",
+               uc.value (), USER_VAL.value ());
 }
 
 /**************************************************************************/
 
 static void
-test_const_get ()
+test_get (Tuple& t)
 {
-    rw_info (0, __FILE__, __LINE__, "get (const)");
+    rw_info (0, __FILE__, __LINE__, "get");
 
+    bool& b = std::get<0> (t);
+    rw_assert (b == BOOL_VAL, __FILE__, __LINE__,
+               "get<0>(t), got %d, expected %b", b, BOOL_VAL);
+    b = !BOOL_VAL;
+    rw_assert (std::get<0> (t) == !BOOL_VAL, __FILE__, __LINE__,
+               "get<0>(t), got %d, expected %b", std::get<0> (t),
+               !BOOL_VAL);
+
+    char& c = std::get<1> (t);
+    rw_assert (c == 'a', __FILE__, __LINE__,
+               "get<1>(t), got %c, expected \'%c\'", c, CHAR_VAL);
+    c = '1';
+    rw_assert (std::get<1> (t) == '1', __FILE__, __LINE__,
+               "get<1>(t), got %c, expected \'1\'", std::get<1> (t));
+
+    int& i = std::get<2> (t);
+    rw_assert (i == INT_VAL, __FILE__, __LINE__,
+               "get<2>(t), got %d, expected %d", i, INT_VAL);
+    i = INT_VAL+1;
+    rw_assert (std::get<2> (t) == INT_VAL+1, __FILE__, __LINE__,
+               "get<1>(t), got %d, expected %d", std::get<2> (t),
+               INT_VAL+1);
+
+    double& d = std::get<3> (t);
+    rw_assert (0 == rw_dblcmp (d, DBL_VAL), __FILE__, __LINE__,
+               "get<3>(t), got %f, expected %f", d, DBL_VAL);
+    d = DBL_VAL*DBL_VAL;
+    rw_assert (0 == rw_dblcmp (std::get<3> (t), DBL_VAL*DBL_VAL),
+               __FILE__, __LINE__,
+               "get<3>(t), got %f, expected %f", std::get<3> (t),
+               DBL_VAL*DBL_VAL);
+
+    void* p = std::get<4> (t);
+    rw_assert (p == PTR_VAL, __FILE__, __LINE__,
+               "get<4>(t), got %p, expected %p", p, PTR_VAL);
+    p = &d;
+    rw_assert (std::get<4> (t) == &d, __FILE__, __LINE__,
+               "get<4>(t), got %p, expected %p", std::get<4> (t), &d);
+
+    UserDefined& uc = std::get<5> (t);
+    rw_assert (uc == USER_VAL, __FILE__, __LINE__,
+               "get<5>(t), got %d, expected %d",
+               uc.value (), USER_VAL.value ());
+    uc = UserDefined (INT_VAL);
+    rw_assert ((std::get<5> (t)).value () == INT_VAL, __FILE__, __LINE__,
+               "get<5>(t), got %d, expected %d",
+               (std::get<5> (t)).value (), INT_VAL);
 }
 
 /**************************************************************************/
 
 static int
-run_test (int /*unused*/, char* /*unused*/ [])
+run_test (int /*argc*/, char* argv [])
 {
-    test_get ();
-    test_const_get ();
+    ptr_val = static_cast<void*> (argv [0]);
+    Tuple t (BOOL_VAL, CHAR_VAL, INT_VAL, DBL_VAL, PTR_VAL, USER_VAL);
+
+    test_const_get (t);
+    test_get (t);
 
     return 0;
 }
 
+#else // _RWSTD_NO_EXT_CXX_0X || _RWSTD_NO_RVALUE_REFERENCES
+
+static int
+run_test (int, char*[])
+{
+
+#if defined (_RWSTD_NO_EXT_CXX_0X)
+
+    rw_warn (0, 0, __LINE__,
+             "test disabled because _RWSTD_NO_EXT_CXX_0X is defined");
+
+#elif defined (_RWSTD_NO_RVALUE_REFERENCES)
+
+    rw_warn (0, 0, __LINE__,
+             "test disabled because _RWSTD_NO_RVALUE_REFERENCES is "
+			 "defined");
+
+#endif
+
+    return 0;
+}
+
+#endif // _RWSTD_NO_EXT_CXX_0X || _RWSTD_NO_RVALUE_REFERENCES
+
 /*extern*/ int
 main (int argc, char* argv [])
 {
     return rw_test (argc, argv, __FILE__,
-                    "[tuple.elem]",
-                    "20.3.1.5  Element access",
+                    "[tuple.elem]", "20.3.1.5  Element access",
                     run_test, "", 0);
 }
 
diff --git a/tests/utilities/20.tuple.h b/tests/utilities/20.tuple.h
index b38d7c4..2eeb413 100644
--- a/tests/utilities/20.tuple.h
+++ b/tests/utilities/20.tuple.h
@@ -2,7 +2,7 @@
  *
  * 20.tuple.h - framework for tuple tests
  *
- * $Id$
+ * $Id: 20.tuple.h 677985 2008-07-18 18:05:55Z elemings $
  *
  ***************************************************************************
  *
@@ -22,31 +22,203 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 2008 Rogue Wave Software.
- * 
+ * Copyright 2008 Rogue Wave Software, Inc.
+ *
  **************************************************************************/
 
 #ifndef RW_20_TUPLE_H_INCLUDED
 #define RW_20_TUPLE_H_INCLUDED
 
+#include <ostream>              // for std::ostream
 #include <tuple>
-
-#include <rw_value.h>                       // for UserClass
+#include <type_traits>          // for std::decay
+#include <utility>              // for std::move
 
 
-// various tuple types for test purposes
+// user-defined class for tuple testing (similar to UserClass)
 
-typedef std::tuple < >                      EmptyTuple;
-typedef std::tuple < int >                  IntTuple;
-typedef std::tuple < const int >            ConstIntTuple;
-typedef std::tuple < long, const char* >    PairTuple;
-typedef std::tuple < UserClass >            UserTuple;
-typedef std::tuple < std::tuple < int > >   NestedTuple;
+class UserDefined
+{
 
-#define BigList      bool, char, int, double, void*, UserClass
-#define BigListSize  6
+    int                 value_;         // some arbitrary value
 
-typedef std::tuple < BigList >              BigTuple;
+public:
+
+    // types
+
+    typedef int         value_type;
+    typedef unsigned    size_type;
+
+    struct count_type   // number of constructors/operators called
+    {
+        size_type   dflt_ctor;
+        size_type   copy_ctor;
+        size_type   tmpl_ctor;
+        size_type   move_ctor;
+        size_type   copy_asgn;
+        size_type   tmpl_asgn;
+        size_type   move_asgn;
+    };
+
+    static count_type   actual;         // since last reset()
+    static count_type   expect;         // modified by expect()
+
+
+    // constructors
+
+    UserDefined ()
+        : value_ () { ++actual.dflt_ctor; }
+
+    UserDefined (const UserDefined& src)
+        : value_ (src.value_) { ++actual.copy_ctor; }
+
+#if !defined _RWSTD_NO_RVALUE_REFERENCES
+
+    UserDefined (UserDefined&& src)
+        : value_ (std::move (src.value_))
+        { ++actual.move_ctor; }
+
+    // Requires: U is convertible to `value_type'.
+    template <class U >
+    explicit UserDefined (U&& u)
+        : value_ (std::move (u)) { ++actual.tmpl_ctor; }
+
+#endif   // !defined _RWSTD_NO_RVALUE_REFERENCES
+
+
+    // assignment
+
+    UserDefined& operator= (const UserDefined& src)
+    {
+        value_ = src.value_;
+        ++actual.copy_asgn;
+        return *this;
+    }
+
+    template <class U>
+    UserDefined& operator= (const U& src)
+    {
+        value_ = src;
+        ++actual.tmpl_asgn;
+        return *this;
+    }
+
+#if !defined _RWSTD_NO_RVALUE_REFERENCES
+
+    UserDefined& operator= (const UserDefined&& src)
+    {
+        value_ = std::move (src.value_);
+        ++actual.move_asgn;
+        return *this;
+    }
+
+#endif   // !defined _RWSTD_NO_RVALUE_REFERENCES
+
+
+    // accessors
+
+    value_type value () const { return value_; }
+
+
+    // testing
+
+    static void reset ()
+    {
+        actual.dflt_ctor = actual.copy_ctor = actual.tmpl_ctor =
+        actual.move_ctor = actual.copy_asgn = actual.move_asgn =
+        actual.tmpl_asgn = 0;
+
+        expect.dflt_ctor = expect.copy_ctor = expect.tmpl_ctor =
+        expect.move_ctor = expect.copy_asgn = expect.move_asgn =
+        expect.tmpl_asgn = 0;
+    }
+
+
+    // implicit value_type conversion?
+};
+
+UserDefined::count_type
+UserDefined::actual = { 0, 0, 0, 0, 0, 0, 0 };
+
+UserDefined::count_type
+UserDefined::expect = { 0, 0, 0, 0, 0, 0, 0 };
+
+inline bool
+operator== (const UserDefined& lhs, const UserDefined& rhs)
+{
+    return lhs.value () == rhs.value ();
+}
+
+inline bool
+operator< (const UserDefined& lhs, const UserDefined& rhs)
+{
+    return lhs.value () < rhs.value ();
+}
+
+/**************************************************************************/
+
+// tuple names
+
+template <class T>
+struct type_name_ { static const char* value; };
+
+#define TYPE_NAME(T)    \
+template <> const char* type_name_<T>::value = #T;
+
+TYPE_NAME (std::tuple<>)
+TYPE_NAME (std::tuple<int>)
+TYPE_NAME (std::tuple<const int>)
+TYPE_NAME (std::tuple<int&>)
+TYPE_NAME (std::tuple<std::tuple<int> >)
+TYPE_NAME (std::tuple<UserDefined>)
+
+#undef TYPE_NAME
+#define TYPE_NAME(T, S) \
+template <> const char* type_name_<T>::value = S;
+
+#undef TUPLE
+#define TUPLE           std::tuple<long, const char*>
+TYPE_NAME (TUPLE, "std::tuple<long, const char*>")
+
+#undef TUPLE
+#define TUPLE           \
+std::tuple<bool, char, int, double, void*, UserDefined>
+TYPE_NAME (TUPLE, "std::tuple<bool, char, int, double, void*, " \
+                  "UserDefined>")
+
+#undef TUPLE
+
+#undef TYPE_NAME
+#define TYPE_NAME(T)    type_name_<T>::value
+
+/**************************************************************************/
+
+// formatting specifiers
+
+template <class T>
+struct fmt_spec { static const char* value; };
+
+#define FMT_SPEC(T, S)  \
+template <> const char* fmt_spec<T>::value = #S;
+
+FMT_SPEC (bool, %b)
+FMT_SPEC (char, %c)
+FMT_SPEC (int, %d)
+FMT_SPEC (unsigned, %u)
+FMT_SPEC (long, %ld)
+FMT_SPEC (float, %f)
+FMT_SPEC (double, %f)
+FMT_SPEC (char*, %s)
+FMT_SPEC (char const*, %s)
+FMT_SPEC (void*, %p)
+FMT_SPEC (void const*, %p)
+
+#undef DECAY
+#define DECAY(T)        typename std::decay<T>::type
+
+// ignore cv-qualifiers and references
+#undef FMT_SPEC
+#define FMT_SPEC(T)     fmt_spec<DECAY (T)>::value
 
 
 #endif   // define RW_20_TUPLE_H_INCLUDED
diff --git a/tests/utilities/20.tuple.helpers.cpp b/tests/utilities/20.tuple.helpers.cpp
index ca3e029..c2bf654 100644
--- a/tests/utilities/20.tuple.helpers.cpp
+++ b/tests/utilities/20.tuple.helpers.cpp
@@ -2,7 +2,7 @@
  *
  * 20.tuple.helpers.cpp - tests exercising tuple helpers
  *
- * $Id$
+ * $Id: 20.tuple.helpers.cpp 677985 2008-07-18 18:05:55Z elemings $
  *
  ***************************************************************************
  *
@@ -22,18 +22,22 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 2008 Rogue Wave Software.
- * 
+ * Copyright 2008 Rogue Wave Software, Inc.
+ *
  **************************************************************************/
 
+#include <rw_driver.h>
+
+// compile out all test code if extensions disabled
+#if    !defined (_RWSTD_NO_EXT_CXX_0X) \
+    && !defined (_RWSTD_NO_RVALUE_REFERENCES)
+
 #include <tuple>
 
 #include "20.tuple.h"
 
 /**************************************************************************/
 
-#include <rw_driver.h>
-
 static void
 test_tuple_size ()
 {
@@ -45,16 +49,22 @@
                "tuple_size<" #T ">::value, got %d, expected " \
                STRING (S), std::tuple_size<T>::value)
 
-    TEST (EmptyTuple, 0);
+    TEST (std::tuple<>, 0);
 
-    TEST (IntTuple, 1);
-    TEST (ConstIntTuple, 1);
-    TEST (UserTuple, 1);
-    TEST (NestedTuple, 1);
+    TEST (std::tuple<int>, 1);
+    TEST (std::tuple<const int>, 1);
+    TEST (std::tuple<UserDefined>, 1);
+    TEST (std::tuple<std::tuple<int> >, 1);
 
-    TEST (PairTuple, 2);
+#undef TUPLE
+#define TUPLE std::tuple<long, const char*>
 
-    TEST (BigTuple, BigListSize);
+    TEST (TUPLE, 2);
+
+#undef TUPLE
+#define TUPLE std::tuple<bool, char, int, double, void*, UserDefined>
+
+    TEST (TUPLE, 6);
 }
 
 /**************************************************************************/
@@ -69,7 +79,7 @@
     enum {
         inherited,
         const_int,
-        user_class,
+        user_defined,
         int_tuple
     } type_id;
 
@@ -82,8 +92,8 @@
     any_t (const int)
         : rw_any_t (char ()), type_id (const_int) { }
 
-    any_t (UserClass)
-        : rw_any_t (char ()), type_id (user_class) { }
+    any_t (UserDefined)
+        : rw_any_t (char ()), type_id (user_defined) { }
 
     any_t (std::tuple< int >)
         : rw_any_t (char ()), type_id (int_tuple) { }
@@ -91,7 +101,7 @@
     const char* type_name () const
     {
         return type_id == const_int? "const int":
-               type_id == user_class? "UserClass":
+               type_id == user_defined? "UserDefined":
                type_id == int_tuple? "std::tuple<int>":
                rw_any_t::type_name ();
     }
@@ -102,32 +112,43 @@
 {
     rw_info (0, __FILE__, __LINE__, "tuple_element");
 
+#undef IS_SAME
 #define IS_SAME(T,U) \
         _RW::__rw_is_same<T, U>::value
+
+#undef TYPE_NAME
 #define TYPE_NAME(T) \
         (any_t (T ())).type_name ()
 
 #undef TEST
 #define TEST(N, T, E) \
-    typedef std::tuple_element<N, T>::type T ## N; \
-    rw_assert (IS_SAME(T ## N, E), __FILE__, __LINE__, \
+{ \
+    typedef std::tuple_element<N, T>::type elem_type; \
+    rw_assert (IS_SAME(elem_type, E), __FILE__, __LINE__, \
                "tuple_element<0, " #T ">::type, got type \"%s\", " \
-               "expected type \"" #E "\"", TYPE_NAME (T##N))
+               "expected type \"" #E "\"", TYPE_NAME (elem_type)); \
+}
 
-    TEST (0, IntTuple, int);
-    TEST (0, ConstIntTuple, const int);
-    TEST (0, NestedTuple, std::tuple<int>);
-    TEST (0, UserTuple, UserClass);
+    TEST (0, std::tuple<int>, int)
+    TEST (0, std::tuple<const int>, const int)
+    TEST (0, std::tuple<std::tuple<int> >, std::tuple<int>)
+    TEST (0, std::tuple<UserDefined>, UserDefined)
 
-    TEST (0, PairTuple, long);
-    TEST (1, PairTuple, const char*);
+#undef TUPLE
+#define TUPLE std::tuple<long, const char*>
 
-    TEST (0, BigTuple, bool);
-    TEST (1, BigTuple, char);
-    TEST (2, BigTuple, int);
-    TEST (3, BigTuple, double);
-    TEST (4, BigTuple, void*);
-    TEST (5, BigTuple, UserClass);
+    TEST (0, TUPLE, long)
+    TEST (1, TUPLE, const char*)
+
+#undef TUPLE
+#define TUPLE std::tuple<bool, char, int, double, void*, UserDefined>
+
+    TEST (0, TUPLE, bool)
+    TEST (1, TUPLE, char)
+    TEST (2, TUPLE, int)
+    TEST (3, TUPLE, double)
+    TEST (4, TUPLE, void*)
+    TEST (5, TUPLE, UserDefined)
 }
 
 /**************************************************************************/
@@ -141,6 +162,30 @@
     return 0;
 }
 
+#else // _RWSTD_NO_EXT_CXX_0X || _RWSTD_NO_RVALUE_REFERENCES
+
+static int
+run_test (int, char*[])
+{
+
+#if defined (_RWSTD_NO_EXT_CXX_0X)
+
+    rw_warn (0, 0, __LINE__,
+             "test disabled because _RWSTD_NO_EXT_CXX_0X is defined");
+
+#elif defined (_RWSTD_NO_RVALUE_REFERENCES)
+
+    rw_warn (0, 0, __LINE__,
+             "test disabled because _RWSTD_NO_RVALUE_REFERENCES is "
+			 "defined");
+
+#endif
+
+    return 0;
+}
+
+#endif // _RWSTD_NO_EXT_CXX_0X || _RWSTD_NO_RVALUE_REFERENCES
+
 /*extern*/ int
 main (int argc, char* argv [])
 {
diff --git a/tests/utilities/20.tuple.rel.cpp b/tests/utilities/20.tuple.rel.cpp
new file mode 100644
index 0000000..4c427ec
--- /dev/null
+++ b/tests/utilities/20.tuple.rel.cpp
@@ -0,0 +1,164 @@
+/***************************************************************************
+ *
+ * 20.tuple.rel.cpp - tests exercising tuple relational operators
+ *
+ * $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.
+ *
+ **************************************************************************/
+
+#include <rw_driver.h>
+
+// compile out all test code if extensions disabled
+#if    !defined (_RWSTD_NO_EXT_CXX_0X) \
+    && !defined (_RWSTD_NO_RVALUE_REFERENCES)
+
+#include <tuple>
+
+#include "20.tuple.h"
+
+/**************************************************************************/
+
+static void
+test_eq ()
+{
+    rw_info (0, __FILE__, __LINE__, "operator==");
+
+    std::tuple<> nt1, nt2;
+    // special case
+    rw_assert (nt1 == nt1, __FILE__, __LINE__,
+               "nt1 == nt1, got false, expected true");
+
+#undef TEST
+#define TEST(expr)      \
+    rw_assert (expr, __FILE__, __LINE__, #expr \
+               "; got %b, expected %b", !(expr), expr)
+
+    TEST (nt1 == nt2);
+
+    std::tuple<int> it1 (1), it2 (1), it3 (2);
+    TEST (it1 == it1);
+    TEST (it1 == it2);
+    TEST (!(it1 == it3));
+
+    UserDefined ud1 (1), ud2 (2);
+    std::tuple<UserDefined> ut1 (ud1), ut2 (ud1), ut3 (ud2);
+    TEST (ut1 == ut1);
+    TEST (ut1 == ut2);
+    TEST (!(ut1 == ut3));
+
+    std::tuple<bool, char, int, double, void*, UserDefined>
+        bt1 (true, 'a', 255, 3.14159, &nt1, ud1),
+        bt2 (true, 'a', 255, 3.14159, &nt1, ud1),
+        bt3 (true, 'a', 256, 3.14159, &nt1, ud1);
+    TEST (bt1 == bt1);
+    TEST (bt1 == bt2);
+    TEST (!(bt1 == bt3));
+}
+
+/**************************************************************************/
+
+static void
+test_lt ()
+{
+    rw_info (0, __FILE__, __LINE__, "operator<");
+
+    std::tuple<> nt1, nt2;
+    TEST (!(nt1 < nt1));
+    TEST (!(nt1 < nt2));
+
+    std::tuple<int> it1 (1), it2 (2);
+    TEST (!(it1 < it1));
+    TEST (it1 < it2);
+
+    UserDefined ud1 (1), ud2 (2);
+    std::tuple<UserDefined> ut1 (ud1), ut2 (ud2);
+    TEST (!(ut1 < ut1));
+    TEST (ut1 < ut2);
+
+    std::tuple<long, const char*> pt1 (1234L, "string");
+    TEST (!(pt1 < pt1));
+    std::tuple<long, const char*> pt2 (1235L, "string");
+    TEST (pt1 < pt2);
+    std::tuple<long, const char*> pt3 (1234L, "strings");
+    TEST (pt1 < pt3);
+
+    std::tuple<bool, char, int, double, void*, UserDefined>
+        bt1 (true, 'a', 255, 3.14159, &nt1, ud1),
+        bt2 (true, 'a', 256, 3.14159, &nt1, ud1),
+        bt3 (true, 'a', 255, 3.14159, &nt1, ud2);
+    rw_assert (!(bt1 < bt1), __FILE__, __LINE__,
+               "bt1 < bt1, got true, expected false");
+    rw_assert (bt1 < bt2, __FILE__, __LINE__,
+               "bt1 < bt2, got false, expected true");
+    rw_assert (bt1 < bt3, __FILE__, __LINE__,
+               "bt1 < bt3, got false, expected true");
+}
+
+/**************************************************************************/
+
+static int
+run_test (int /*argc*/, char* /*argv*/ [])
+{
+    test_eq ();
+    test_lt ();
+
+    //test_ne ();
+    //test_gt ();
+    //test_le ();
+    //test_ge ();
+
+    return 0;
+}
+
+#else // _RWSTD_NO_EXT_CXX_0X || _RWSTD_NO_RVALUE_REFERENCES
+
+static int
+run_test (int, char*[])
+{
+
+#if defined (_RWSTD_NO_RVALUE_REFERENCES)
+
+    rw_warn (0, 0, __LINE__,
+             "test disabled because _RWSTD_NO_EXT_CXX_OX is defined");
+
+#elif defined (_RWSTD_NO_RVALUE_REFERENCES)
+
+    rw_warn (0, 0, __LINE__,
+             "test disabled because _RWSTD_NO_RVALUE_REFERENCES is "
+			 "defined");
+
+#endif
+
+    return 0;
+}
+
+#endif // _RWSTD_NO_EXT_CXX_0X || _RWSTD_NO_RVALUE_REFERENCES
+
+/*extern*/ int
+main (int argc, char* argv [])
+{
+    return rw_test (argc, argv, __FILE__,
+                    "[tuple.rel]", "20.3.1.6  Relational operators",
+                    run_test, "", 0);
+}
+