Index: /trunk/nv/core/common.hh
===================================================================
--- /trunk/nv/core/common.hh	(revision 376)
+++ /trunk/nv/core/common.hh	(revision 377)
@@ -233,42 +233,4 @@
 	};
 
-	template< typename T, T VALUE>
-	struct integral_constant
-	{
-		static const T value = VALUE;
-		typedef T value_type;
-		typedef integral_constant<T, VALUE> type;
-		NV_CONSTEXPR operator value_type() const NV_NOEXCEPT { return ( value ); }
-		NV_CONSTEXPR value_type operator()() const NV_NOEXCEPT { return value; }
-	};
-
-	// TODO: Propagate
-	template< bool B >
-	using bool_constant = integral_constant < bool, B > ;
-
-	typedef bool_constant<true> true_type;
-	typedef bool_constant<false> false_type;
-
-	template< bool TEST, typename T = void>
-	struct enable_if {};
-
-	template< typename T >
-	struct enable_if < true, T >
-	{
-		typedef T type;
-	};
-
-	template< bool TEST, typename T1, typename T2 >
-	struct conditional
-	{
-		typedef T2 type;
-	};
-
-	template< typename T1, typename T2>
-	struct conditional < true, T1, T2 >
-	{
-		typedef T1 type;
-	};
-
 	template <typename OBJ, typename T>
 	inline size_t offset_of( T OBJ::*ptr )
Index: /trunk/nv/core/random.hh
===================================================================
--- /trunk/nv/core/random.hh	(revision 376)
+++ /trunk/nv/core/random.hh	(revision 377)
@@ -10,5 +10,5 @@
 #include <nv/core/common.hh>
 #include <nv/stl/math.hh>
-#include <nv/stl/type_traits.hh>
+#include <nv/stl/traits/primary.hh>
 
 namespace nv
Index: /trunk/nv/core/types.hh
===================================================================
--- /trunk/nv/core/types.hh	(revision 376)
+++ /trunk/nv/core/types.hh	(revision 377)
@@ -8,6 +8,7 @@
 #include <nv/core/common.hh>
 #include <nv/stl/math.hh>
+#include <nv/stl/memory.hh>
 #include <nv/stl/cstring_store.hh>
-#include <nv/stl/type_traits.hh>
+#include <nv/stl/traits/properties.hh>
 #include <nv/stl/type_info.hh>
 #include <unordered_map>
@@ -110,6 +111,6 @@
 			i_type->size = sizeof( TYPE );
 
-			i_type->constructor = construct_object_raw < TYPE > ;
-			i_type->destructor  = destroy_object_raw < TYPE > ;
+			i_type->constructor = raw_construct_object < TYPE >;
+			i_type->destructor  = raw_destroy_object < TYPE >;
 			m_idx_types[typeid( TYPE )] = i_type;
 			m_type_list.push_back( i_type );
@@ -164,12 +165,13 @@
 	type_creator type_creator::field( const char* aname, TFIELD TOBJECT::*field, typename enable_if< is_container<TFIELD>::value, void* >::type )
 	{
+		typedef typename TFIELD::value_type field_type;
 		NV_ASSERT( m_entry->enum_list.empty(), "Type cannot have both enums and fields!" );
 		type_field f;
 		f.name = m_entry->names.insert( name );
-		f.raw_type = &typeid( typename remove_pointer<typename TFIELD::value_type>::type );
+		f.raw_type = &typeid( remove_pointer_t<field_type> );
 		f.type = type_db->get_type( *( f.raw_type ) );
 		f.flags = TF_CONTAINER |
-			( is_pointer<typename TFIELD::value_type>::value ? TF_POINTER : 0 ) |
-			( is_pod<typename TFIELD::value_type>::value ? TF_SIMPLETYPE : 0 );
+			( is_pointer<field_type>::value ? TF_POINTER : 0 ) |
+			( is_pod<field_type>::value ? TF_SIMPLETYPE : 0 );
 		f.offset = offset_of( field );
 		m_entry->field_list.push_back( f );
@@ -183,5 +185,5 @@
 		type_field f;
 		f.name = m_entry->names.insert( name );
-		f.raw_type = &typeid( typename remove_pointer<TFIELD>::type );
+		f.raw_type = &typeid( remove_pointer_t<TFIELD> );
 		f.type = type_db->get_type( *( f.raw_type ) );
 		f.flags =
Index: /trunk/nv/interface/interpolation_template.hh
===================================================================
--- /trunk/nv/interface/interpolation_template.hh	(revision 376)
+++ /trunk/nv/interface/interpolation_template.hh	(revision 377)
@@ -156,6 +156,6 @@
 			static_assert( key_has_slot< KEY, animation_slot::SCALE >::value == false, "key!");
 			return extract_transform_pr_impl( k, 
-				key_has_slot< KEY, animation_slot::POSITION >::value >(),
-				key_has_slot< KEY, animation_slot::ROTATION >::value >()
+				key_has_slot< KEY, animation_slot::POSITION >(),
+				key_has_slot< KEY, animation_slot::ROTATION >()
 				);
 		}
Index: /trunk/nv/lua/lua_state.hh
===================================================================
--- /trunk/nv/lua/lua_state.hh	(revision 376)
+++ /trunk/nv/lua/lua_state.hh	(revision 377)
@@ -15,4 +15,5 @@
 #include <nv/stl/flags.hh>
 #include <nv/stl/handle.hh>
+#include <nv/stl/traits/function.hh>
 
 #include <nv/lua/lua_handle.hh>
Index: /trunk/nv/lua/lua_values.hh
===================================================================
--- /trunk/nv/lua/lua_values.hh	(revision 376)
+++ /trunk/nv/lua/lua_values.hh	(revision 377)
@@ -9,5 +9,5 @@
 
 #include <nv/core/common.hh>
-#include <nv/stl/type_traits.hh>
+#include <nv/stl/traits/properties.hh>
 #include <nv/stl/string.hh>
 
@@ -178,9 +178,9 @@
 			struct type_degrade
 			{
-				typedef typename remove_cv< typename remove_reference<T>::type >::type type;
-			};
-
-			template <typename T>
-			struct type_degrade< T, typename enable_if< is_floating_point< T >::value >::type >
+				typedef remove_cvr_t<T> type;
+			};
+
+			template <typename T>
+			struct type_degrade< T, enable_if_t< is_floating_point< T >::value > >
 			{
 				typedef lnumber type;
@@ -188,5 +188,5 @@
 
 			template <typename T>
-			struct type_degrade< T, typename enable_if< is_integral< T >::value && is_signed< T >::value >::type >
+			struct type_degrade< T, enable_if_t< is_integral< T >::value && is_signed< T >::value > >
 			{
 				typedef linteger type;
@@ -194,5 +194,5 @@
 
 			template <typename T>
-			struct type_degrade< T, typename enable_if< is_integral< T >::value && is_unsigned< T >::value >::type >
+			struct type_degrade< T, enable_if_t< is_integral< T >::value && is_unsigned< T >::value > >
 			{
 				typedef lunsigned type;
@@ -200,5 +200,5 @@
 
 			template <typename T>
-			struct type_degrade< T, typename enable_if< is_cstring< T >::value >::type >
+			struct type_degrade< T, enable_if_t< is_cstring< T >::value > >
 			{
 				typedef const char* type;
@@ -206,5 +206,5 @@
 
 			template <typename T>
-			struct type_degrade< T, typename enable_if< is_stdstring< T >::value >::type >
+			struct type_degrade< T, enable_if_t< is_stdstring< T >::value > >
 			{
 				typedef std::string type;
@@ -216,10 +216,12 @@
 				typedef bool type;
 			};
+
+			template < typename T >
+			using type_degrade_t = typename type_degrade< T >::type;
 
  			template < typename T >
  			void push_value( lua_State *L, const T& p )
  			{
-				typedef typename type_degrade<T>::type degraded;
- 				pass_traits<degraded>::push( L, p );
+				pass_traits< type_degrade_t<T> >::push( L, p );
  			}
 
@@ -227,11 +229,11 @@
 			void push_values(lua_State *L, T&& p)
 			{
-				push_value( L, std::forward<T>(p) );
+				push_value( L, forward<T>(p) );
 			}
 			template < typename T, typename ...Ts >
 			void push_values(lua_State *L, T&& p, Ts&& ...ps)
 			{
-				push_value(L, std::forward<T>(p));
-				push_values(L, std::forward<Ts>(ps)...);
+				push_value(L, forward<T>(p));
+				push_values(L, forward<Ts>(ps)...);
 			}
 
@@ -240,6 +242,5 @@
 			inline void pop_value( lua_State *L, T& p )
 			{
-				typedef typename type_degrade<T>::type degraded;
-				p = (T)pass_traits<degraded>::to( L, -1 );
+				p = (T)pass_traits< type_degrade_t<T> >::to( L, -1 );
 				detail::pop_and_discard(L, 1);
 			}
@@ -247,7 +248,6 @@
 			inline T pop_return_value( lua_State *L )
 			{
-				typedef typename type_degrade<T>::type degraded;
 				T ret;
-				ret = (T)pass_traits<degraded>::to( L, -1 );
+				ret = (T)pass_traits< type_degrade_t<T> >::to( L, -1 );
 				detail::pop_and_discard(L, 1);
 				return ret;
@@ -262,6 +262,5 @@
 			inline void pop_value( lua_State *L, T& p, const T& def )
 			{
-				typedef typename type_degrade<T>::type degraded;
-				p = (T)pass_traits<degraded>::to( L, -1, def );
+				p = (T)pass_traits< type_degrade_t<T> >::to( L, -1, def );
 				detail::pop_and_discard(L, 1);
 			}
@@ -269,7 +268,6 @@
 			inline T pop_return_value( lua_State *L, const T& def )
 			{
-				typedef typename type_degrade<T>::type degraded;
 				T ret;
-				ret = (T)pass_traits<degraded>::to( L, -1, def );
+				ret = (T)pass_traits< type_degrade_t<T> >::to( L, -1, def );
 				detail::pop_and_discard(L, 1);
 				return ret;
@@ -277,8 +275,7 @@
 
 			template < typename T >
-			inline typename type_degrade<T>::type get_value( lua_State *L, int index )
-			{
-				typedef typename type_degrade<T>::type degraded;
-				return pass_traits<degraded>::to( L, index );
+			inline type_degrade_t<T> get_value( lua_State *L, int index )
+			{
+				return pass_traits< type_degrade_t<T> >::to( L, index );
 			}
 
@@ -286,6 +283,5 @@
 			inline T get_value( lua_State *L, int index, const T& def )
 			{
-				typedef typename type_degrade<T>::type degraded;
-				return pass_traits<degraded>::to( L, index, def );
+				return pass_traits< type_degrade_t<T> >::to( L, index, def );
 			}
 
Index: /trunk/nv/stl/allocator.hh
===================================================================
--- /trunk/nv/stl/allocator.hh	(revision 376)
+++ /trunk/nv/stl/allocator.hh	(revision 377)
@@ -20,5 +20,4 @@
 
 #include <nv/core/common.hh>
-#include <nv/stl/type_traits.hh>
 
 namespace nv
Index: /trunk/nv/stl/any.hh
===================================================================
--- /trunk/nv/stl/any.hh	(revision 376)
+++ /trunk/nv/stl/any.hh	(revision 377)
@@ -17,7 +17,7 @@
 
 #include <nv/core/common.hh>
+#include <nv/stl/utility.hh>
 #include <nv/stl/type_traits.hh>
 #include <nv/stl/type_info.hh>
-#include <nv/stl/utility.hh>
 
 namespace nv
Index: /trunk/nv/stl/flags.hh
===================================================================
--- /trunk/nv/stl/flags.hh	(revision 376)
+++ /trunk/nv/stl/flags.hh	(revision 377)
@@ -15,5 +15,5 @@
 
 #include <nv/core/common.hh>
-#include <nv/stl/type_traits.hh>
+#include <nv/stl/traits/transforms.hh>
 #include <nv/stl/array.hh>
 
@@ -120,5 +120,5 @@
 		typedef T         index_type;
 		typedef uint32 size_type;
-		typedef typename base_underlying_type<T>::type raw_index_type;
+		typedef make_underlying_type_t<T> raw_index_type;
 
 		static const size_type data_type_size = sizeof( data_type ) * 8;
Index: /trunk/nv/stl/memory.hh
===================================================================
--- /trunk/nv/stl/memory.hh	(revision 376)
+++ /trunk/nv/stl/memory.hh	(revision 377)
@@ -17,5 +17,6 @@
 
 #include <nv/core/common.hh>
-#include <nv/stl/type_traits.hh>
+#include <nv/stl/traits/properties.hh>
+#include <nv/stl/traits/alignment.hh>
 #include <nv/stl/utility.hh>
 #include <nv/stl/iterator.hh>
@@ -96,5 +97,5 @@
 		static NV_CONSTEXPR size_t capacity() { return N; }
 	protected:
-		typedef typename aligned_array<T, N, NV_ALIGN_OF( T ) >::type storage_type;
+		typedef aligned_array_t<T, N, NV_ALIGN_OF( T ) > storage_type;
 		storage_type m_data;
 	};
Index: /trunk/nv/stl/range.hh
===================================================================
--- /trunk/nv/stl/range.hh	(revision 376)
+++ /trunk/nv/stl/range.hh	(revision 377)
@@ -15,5 +15,5 @@
 #include <nv/core/common.hh>
 #include <nv/stl/math.hh>
-#include <nv/stl/type_traits.hh>
+#include <nv/stl/traits/transforms.hh>
 #include <iterator>
 
@@ -97,5 +97,5 @@
 		{
 		public:
-			typedef typename base_underlying_type<T>::type base_type;
+			typedef make_underlying_type_t< T > base_type;
 			typedef forward_iterator_base< T > base_class;
 
@@ -180,5 +180,5 @@
 	{
 	public:
-		typedef typename base_underlying_type<T>::type base_type;
+		typedef make_underlying_type_t< T > base_type;
 		typedef detail::bits_iterator_base<T> iterator;
 		static const T invalid = T( 0 );
Index: /trunk/nv/stl/string.hh
===================================================================
--- /trunk/nv/stl/string.hh	(revision 376)
+++ /trunk/nv/stl/string.hh	(revision 377)
@@ -26,5 +26,5 @@
 #include <fstream>
 #include <nv/core/common.hh>
-#include <nv/stl/type_traits.hh>
+#include <nv/stl/traits/primary.hh>
 #include <nv/stl/memory.hh>
 #include <nv/stl/exception.hh>
@@ -281,22 +281,28 @@
 			static size_t get( const std::string& s ) { return s.length(); }
 		};
+
+		// These could be done much better
+		template <typename T>
+		struct is_cstring_impl
+		{
+			typedef conditional_t < is_array<T>::value, remove_extent_t<T>*, remove_cv_t<T>	> decayed_type;
+			typedef bool_constant <	
+				is_same<       char *, decayed_type >::value ||	
+				is_same< const char *, decayed_type >::value > type;
+		};
+
 	}
 
 	template< typename T >
-	using string_length = detail::string_length_impl <
-		typename remove_cv < typename remove_reference< T >::type >::type >;
-
-	// These could be done much better
+	using string_length = detail::string_length_impl < remove_cvr_t < T > >;
+
+	template < typename T >
+	struct is_cstring : detail::is_cstring_impl< remove_reference_t<T> >::type
+	{
+
+	};
+
 	template <typename T>
-	struct is_cstring
-		: bool_constant < 
-		is_same<       char *, typename decay< T >::type >::value ||
-		is_same< const char *, typename decay< T >::type >::value >
-	{
-	};
-
-	template <typename T>
-	struct is_stdstring
-		: bool_constant < is_same< std::string, typename remove_cvr< T >::type >::value >
+	struct is_stdstring	: is_same< std::string, remove_cvr_t< T > >
 	{
 	};
Index: /trunk/nv/stl/traits/alignment.hh
===================================================================
--- /trunk/nv/stl/traits/alignment.hh	(revision 377)
+++ /trunk/nv/stl/traits/alignment.hh	(revision 377)
@@ -0,0 +1,137 @@
+// Copyright (C) 2015 ChaosForge Ltd
+// http://chaosforge.org/
+//
+// This file is part of NV Libraries.
+// For conditions of distribution and use, see copyright notice in nv.hh
+/**
+* @file alignment.hh
+* @author Kornel Kisielewicz epyon@chaosforge.org
+* @brief type traits - alignment
+*/
+
+#ifndef NV_STL_TRAITS_ALIGNMENT_HH
+#define NV_STL_TRAITS_ALIGNMENT_HH
+
+#include <nv/core/common.hh>
+#include <nv/stl/traits/common.hh>
+
+namespace nv
+{
+
+	namespace detail
+	{
+		class aligned_dummy;
+		typedef void( *aligned_fptr )( );
+		typedef int( aligned_dummy::*aligned_memptr );
+		typedef int ( aligned_dummy::*aligned_memfptr )( );
+	}
+
+#if NV_COMPILER == NV_MSVC 
+#pragma warning( push )
+#pragma warning( disable : 4121 ) 
+#endif		
+	union max_align_t
+	{
+		double                  dummy0;
+		long double             dummy1;
+		void*                   dummy2;
+		long long               dummy3;
+		detail::aligned_fptr    dummy4;
+		detail::aligned_memptr  dummy5;
+		detail::aligned_memfptr dummy6;
+	};
+#if NV_COMPILER == NV_MSVC 
+#pragma warning( pop )
+#endif		
+
+#if NV_COMPILER == NV_CLANG
+	template< typename T, size_t Size, size_t Align >
+	struct aligned_array
+	{
+		typedef T alignas( Align ) type[Size];
+	};
+#elif NV_COMPILER == NV_GNUC
+	template< typename T, size_t Size, size_t Align >
+	struct aligned_array
+	{
+		typedef T __attribute__( ( aligned( Align ) ) ) type[Size];
+	};
+#else
+	// TODO: remove this shit after moving to MSVC 2015
+	template< typename T, size_t Size, size_t Align >
+	struct aligned_array;
+
+	// According to LLVM ( https://llvm.org/svn/llvm-project/llvm/trunk/include/llvm/Support/AlignOf.h )
+	// MSVC has problems with align below 16...
+#define NV_ALIGNED_ARRAY(N) \
+	template< typename T, size_t Size > \
+	struct aligned_array< T, Size, N >  \
+			{ \
+		typedef __declspec( align(N) ) T type[Size]; \
+			}; 
+
+	NV_ALIGNED_ARRAY( 1 )
+		NV_ALIGNED_ARRAY( 2 )
+		NV_ALIGNED_ARRAY( 4 )
+		NV_ALIGNED_ARRAY( 8 )
+		NV_ALIGNED_ARRAY( 16 )
+		NV_ALIGNED_ARRAY( 32 )
+		NV_ALIGNED_ARRAY( 64 )
+		NV_ALIGNED_ARRAY( 128 )
+
+#undef NV_ALIGNED_ARRAY
+#endif
+	
+	template< typename T, size_t Size, size_t Align >
+	using aligned_array_t = typename aligned_array< T, Size, Align >::type;
+
+	template< size_t Size, size_t Align = NV_ALIGN_OF( max_align_t ) >
+	struct aligned_storage
+	{
+		struct type
+		{
+			typename aligned_array< unsigned char, Size, Align >::type data;
+		};
+	};
+
+	template< size_t Size, size_t Align = NV_ALIGN_OF( max_align_t ) >
+	using aligned_storage_t = typename aligned_storage<Size, Align>::type;
+
+	namespace detail
+	{
+		template < size_t... Sizes >
+		struct size_max;
+
+		template <>
+		struct size_max < >
+		{
+			static const size_t value = 0;
+		};
+
+		template < size_t Size >
+		struct size_max < Size >
+		{
+			static const size_t value = Size;
+		};
+
+		template < size_t S1, size_t S2, size_t... Sizes >
+		struct size_max< S1, S2, Sizes... > : size_max < ( S1 < S2 ? S2 : S1 ), Sizes... > {};
+	}
+
+	template< size_t Size, typename... Types >
+	struct aligned_union
+	{
+		static const size_t max_length = detail::size_max < Size, sizeof( Types )... >::value;
+		static const size_t alignment_value = detail::size_max < alignment_of< Types >::value... >::value;
+		struct type
+		{
+			typename aligned_array< unsigned char, max_length, alignment_value >::type data;
+		};
+	};
+
+	template < size_t Size, typename... Types >
+	using aligned_union_t = typename aligned_union<Size, Types...>::type;
+
+}
+
+#endif // NV_STL_TRAITS_ALIGNMENT_HH
Index: /trunk/nv/stl/traits/function.hh
===================================================================
--- /trunk/nv/stl/traits/function.hh	(revision 377)
+++ /trunk/nv/stl/traits/function.hh	(revision 377)
@@ -0,0 +1,93 @@
+// Copyright (C) 2015 ChaosForge Ltd
+// http://chaosforge.org/
+//
+// This file is part of NV Libraries.
+// For conditions of distribution and use, see copyright notice in nv.hh
+/**
+* @file function.hh
+* @author Kornel Kisielewicz epyon@chaosforge.org
+* @brief type traits - function traits
+*/
+// TODO: remove_cv? call traits? support "......"?
+
+#ifndef NV_STL_TRAITS_FUNCTION_HH
+#define NV_STL_TRAITS_FUNCTION_HH
+
+#include <nv/core/common.hh>
+#include <nv/stl/traits/common.hh>
+
+namespace nv
+{
+
+	namespace detail
+	{
+
+		template < typename F >
+		struct function_traits_impl
+		{
+
+		};
+
+		template < typename R >
+		struct function_traits_impl < R( *)( void ) >
+		{
+			typedef R( *type )( );
+			typedef R        return_type;
+			typedef void     class_type;
+			static const int arg_count = 0;
+		};
+
+		template < typename R, typename... Args >
+		struct function_traits_impl < R( *)( Args... ) >
+		{
+			typedef R( *type )( Args... );
+			typedef R        return_type;
+			typedef void     class_type;
+			static const int arg_count = sizeof...( Args );
+		};
+
+		template < class C, typename R >
+		struct function_traits_impl < R( C::* )( ) >
+		{
+			typedef R( *type )( );
+			typedef R       return_type;
+			typedef C       class_type;
+			static const int arg_count = 0;
+		};
+
+		template < class C, typename R, typename... Args >
+		struct function_traits_impl < R( C::* )( Args... ) >
+		{
+			typedef R( C::*type )( Args... );
+			typedef R        return_type;
+			typedef C        class_type;
+			static const int arg_count = sizeof...( Args );
+		};
+
+	}
+
+	template < typename F >
+	struct function_traits : detail::function_traits_impl < F >
+	{
+
+	};
+
+	template < typename T >
+	struct return_type
+	{
+		typedef typename function_traits< T >::return_type type;
+	};
+	template < typename T >
+	using return_type_t = typename return_type<T>::type;
+
+	template < typename T >
+	struct memfn_class_type
+	{
+		typedef typename function_traits< T >::class_type type;
+	};
+	template < typename T >
+	using memfn_class_type_t = typename memfn_class_type<T>::type;
+
+}
+
+#endif // NV_STL_TRAITS_FUNCTION_HH
Index: /trunk/nv/stl/traits/primary.hh
===================================================================
--- /trunk/nv/stl/traits/primary.hh	(revision 377)
+++ /trunk/nv/stl/traits/primary.hh	(revision 377)
@@ -0,0 +1,119 @@
+// Copyright (C) 2015 ChaosForge Ltd
+// http://chaosforge.org/
+//
+// This file is part of NV Libraries.
+// For conditions of distribution and use, see copyright notice in nv.hh
+/**
+* @file primary.hh
+* @author Kornel Kisielewicz epyon@chaosforge.org
+* @brief type traits - primary traits
+*/
+
+#ifndef NV_STL_TRAITS_PRIMARY_HH
+#define NV_STL_TRAITS_PRIMARY_HH
+
+#include <nv/core/common.hh>
+#include <nv/stl/traits/common.hh>
+
+namespace nv
+{
+
+	namespace detail
+	{
+		template< typename T > struct is_integral_impl           : false_type {};
+		template<> struct is_integral_impl< bool >               : true_type{};
+		template<> struct is_integral_impl< char >               : true_type{};
+		template<> struct is_integral_impl< signed char >        : true_type{};
+		template<> struct is_integral_impl< unsigned char >      : true_type{};
+		template<> struct is_integral_impl< wchar_t >            : true_type{};
+		template<> struct is_integral_impl< signed short >       : true_type{};
+		template<> struct is_integral_impl< unsigned short >     : true_type{};
+		template<> struct is_integral_impl< signed int >         : true_type{};
+		template<> struct is_integral_impl< unsigned int >       : true_type{};
+		template<> struct is_integral_impl< signed long >        : true_type{};
+		template<> struct is_integral_impl< unsigned long >      : true_type{};
+		template<> struct is_integral_impl< signed long long >   : true_type{};
+		template<> struct is_integral_impl< unsigned long long > : true_type{};
+
+		template< typename T > struct is_floating_point_impl     : false_type {};
+		template<> struct is_floating_point_impl< float >        : true_type{};
+		template<> struct is_floating_point_impl< double >       : true_type{};
+		template<> struct is_floating_point_impl< long double >  : true_type{};
+
+		template < typename T > struct is_pointer_impl           : false_type {};
+		template < typename T > struct is_pointer_impl< T* >     : true_type{};
+	}
+
+	template< typename T > struct is_void           : is_same < void,      remove_cv_t<T> > {};
+	template< typename T > struct is_nullptr        : is_same < nullptr_t, remove_cv_t<T> > {};
+	template< typename T > struct is_integral       : detail::is_integral_impl < remove_cv_t<T> > {};
+	template< typename T > struct is_floating_point : detail::is_floating_point_impl < remove_cv_t<T> > {};
+
+	template < typename T >           struct is_array          : false_type {};
+	template < typename T >           struct is_array < T[] >  : true_type{};
+	template < typename T, size_t N > struct is_array < T[N] > : true_type{};
+
+	template < typename T >           struct is_enum  : bool_constant < __is_enum( T ) > {};
+	template < typename T >           struct is_union : bool_constant < __is_union( T ) > {};
+	template < typename T >           struct is_class : bool_constant < __is_class( T ) > {};
+
+	// is_function_pointer / is_member_function pointer - extension
+	// TODO: sanity check - this is very different - http://en.cppreference.com/w/cpp/types/is_function
+	// TODO: "......" function match version?
+	// TODO: call conventions really needed?
+
+	template < typename F > struct is_function_pointer : false_type {};
+#if NV_COMPILER == NV_MSVC
+	template < typename R, typename... Args > struct is_function_pointer< R( __cdecl * )( Args... ) > : true_type{};
+	template < typename R, typename... Args > struct is_function_pointer< R( __stdcall * )( Args... ) > : true_type{};
+	template < typename R, typename... Args > struct is_function_pointer< R( __fastcall * )( Args... ) > : true_type{};
+	template < typename R, typename... Args > struct is_function_pointer< R( __vectorcall * )( Args... ) > : true_type{};
+#else
+	template < typename R, typename... Args > struct is_function_pointer< R( *)( Args... ) > : true_type{};
+#endif
+
+	template < typename C > struct is_member_function_pointer : false_type {};
+#if NV_COMPILER == NV_MSVC
+#define NV_IS_MEMFNPTR( call_conv ) \
+	template < typename R, typename C, typename... Args > struct is_member_function_pointer< R( call_conv C::* )( Args... ) > : true_type{}; \
+	template < typename R, typename C, typename... Args > struct is_member_function_pointer< R( call_conv C::* )( Args... ) const > : true_type{}; \
+	template < typename R, typename C, typename... Args > struct is_member_function_pointer< R( call_conv C::* )( Args... ) volatile > : true_type{}; \
+	template < typename R, typename C, typename... Args > struct is_member_function_pointer< R( call_conv C::* )( Args... ) const volatile > : true_type{};
+
+NV_IS_MEMFNPTR( __thiscall )
+NV_IS_MEMFNPTR( __cdecl )
+NV_IS_MEMFNPTR( __stdcall )
+NV_IS_MEMFNPTR( __fastcall )
+NV_IS_MEMFNPTR( __vectorcall )
+
+#undef NV_IS_MEMFNPTR
+#else
+	template < typename R, typename C, typename... Args > struct is_member_function_pointer< R( C::* )( Args... ) > : true_type{};
+	template < typename R, typename C, typename... Args > struct is_member_function_pointer< R( C::* )( Args... ) const > : true_type{};
+	template < typename R, typename C, typename... Args > struct is_member_function_pointer< R( C::* )( Args... ) volatile > : true_type{};
+	template < typename R, typename C, typename... Args > struct is_member_function_pointer< R( C::* )( Args... ) const volatile > : true_type{};
+#endif
+
+	template < typename F >
+	struct is_member_pointer : bool_constant < is_member_function_pointer<F>::value > {};
+	template < typename C, typename R >
+	struct is_member_pointer<R C::*> : true_type{};
+
+	// TODO: check if member functions can actually match under any compiler
+	template < typename T >
+	struct is_pointer : bool_constant < 
+		( detail::is_pointer_impl<remove_cv_t<T>>::value )
+		&& !( is_member_pointer<T>::value ) > {};
+
+	template < typename T >
+	struct is_member_object_pointer : bool_constant <
+		is_member_pointer<T>::value 
+		&& !is_member_function_pointer<T>::value > {};
+
+	template< typename T > struct is_function : bool_constant < is_function_pointer< remove_cv_t<T> *>::value > {};
+	template< typename T > struct is_function < T& >  : false_type{};
+	template< typename T > struct is_function < T&& > : false_type{};
+
+}
+
+#endif // NV_STL_TRAITS_PRIMARY_HH
Index: /trunk/nv/stl/traits/properties.hh
===================================================================
--- /trunk/nv/stl/traits/properties.hh	(revision 377)
+++ /trunk/nv/stl/traits/properties.hh	(revision 377)
@@ -0,0 +1,301 @@
+// Copyright (C) 2015 ChaosForge Ltd
+// http://chaosforge.org/
+//
+// This file is part of NV Libraries.
+// For conditions of distribution and use, see copyright notice in nv.hh
+/**
+* @file properties.hh
+* @author Kornel Kisielewicz epyon@chaosforge.org
+* @brief type traits - type properties
+*/
+
+#ifndef NV_STL_TRAITS_PROPERTIES_HH
+#define NV_STL_TRAITS_PROPERTIES_HH
+
+#include <nv/core/common.hh>
+#include <nv/stl/traits/common.hh>
+#include <nv/stl/traits/primary.hh>
+
+namespace nv
+{
+	template < typename T >
+	struct is_fundamental : bool_constant <
+		is_void<T>::value || 
+		is_nullptr<T>::value ||
+		is_integral<T>::value ||
+		is_floating_point<T>::value
+	> {};
+
+	template < typename T >
+	struct is_arithmetic : bool_constant < 
+		is_integral<T>::value || 
+		is_floating_point<T>::value 
+	> {};
+
+	template < typename T >
+	struct is_scalar : bool_constant <
+		is_arithmetic<T>::value ||
+		is_enum<T>::value ||
+		is_pointer<T>::value ||
+		is_member_pointer<T>::value ||
+		is_nullptr<T>::value
+	> {};
+
+	template < typename T >
+	struct is_object : bool_constant <
+		is_scalar<T>::value ||
+		is_array<T>::value ||
+		is_union<T>::value ||
+		is_class<T>::value
+	> {};
+
+	template < typename T >
+	struct is_compound : bool_constant < !is_fundamental< T >::value > {};
+
+	template < typename T >
+	struct is_reference : bool_constant < 
+		is_lvalue_reference<T>::value || 
+		is_rvalue_reference<T>::value 
+	> {};
+
+
+	// TODO : confirm conformance
+#if NV_COMPILER == NV_MSVC
+	template < typename T >	struct is_trivially_copyable : bool_constant < ( __has_trivial_copy( T ) || __is_pod( T ) ) && !is_volatile<T>::value > {};
+#else
+	template < typename T >	struct is_trivially_copyable : bool_constant < ( __has_trivial_copy( T ) || __is_pod( T ) ) && ( !is_volatile<T>::value && !is_reference<T>::value ) > {};
+#endif
+
+	template < typename T > struct is_trivial         : bool_constant < __is_trivial( T ) > {};
+	template < typename T >	struct is_standard_layout : bool_constant < __is_standard_layout( T ) > {};
+	template < typename T > struct is_pod             : bool_constant < __is_pod( T ) > {};
+	template < typename T > struct is_literal_type    : bool_constant < __is_literal_type( T ) > {};
+	template < typename T > struct is_empty           : bool_constant < __is_empty( T ) > {};
+	template < typename T > struct is_polymorphic     : bool_constant < __is_polymorphic( T ) > {};
+	template < typename T > struct is_abstract        : bool_constant < __is_abstract( T ) > {};
+
+	template < typename T > struct is_signed : false_type {};
+	template <> struct is_signed<char>       : bool_constant< ( char( 0 ) > char( -1 ) ) > {};
+	template <> struct is_signed<signed char>            : true_type{};
+	template <> struct is_signed<const signed char>      : true_type{};
+	template <> struct is_signed<signed short>           : true_type{};
+	template <> struct is_signed<const signed short>     : true_type{};
+	template <> struct is_signed<signed int>             : true_type{};
+	template <> struct is_signed<const signed int>       : true_type{};
+	template <> struct is_signed<signed long>            : true_type{};
+	template <> struct is_signed<const signed long>      : true_type{};
+	template <> struct is_signed<signed long long>       : true_type{};
+	template <> struct is_signed<const signed long long> : true_type{};
+
+	template < typename T > struct is_unsigned : false_type {};
+	template <> struct is_unsigned<char>       : bool_constant < ( char( 0 ) < char( -1 ) ) > {};
+	template <> struct is_unsigned<unsigned char>            : true_type{};
+	template <> struct is_unsigned<const unsigned char>      : true_type{};
+	template <> struct is_unsigned<unsigned short>           : true_type{};
+	template <> struct is_unsigned<const unsigned short>     : true_type{};
+	template <> struct is_unsigned<unsigned int>             : true_type{};
+	template <> struct is_unsigned<const unsigned int>       : true_type{};
+	template <> struct is_unsigned<unsigned long>            : true_type{};
+	template <> struct is_unsigned<const unsigned long>      : true_type{};
+	template <> struct is_unsigned<unsigned long long>       : true_type{};
+	template <> struct is_unsigned<const unsigned long long> : true_type{};
+
+#if NV_COMPILER == NV_MSVC
+// 	TODO : implement when needed - this works only in MSVC
+// 	template < typename T, typename... Args > 
+// 	struct is_constructible : bool_constant < __is_constructible( T, Args ) > {};
+// 	template < typename T, typename... Args > 
+// 	struct is_trivially_constructible : bool_constant < __is_trivially_constructible( T, Args ) > {};
+// 	template < typename T, typename... Args > 
+// 	struct is_nothrow_constructible : bool_constant < __is_nothrow_constructible( T, Args ) > {};
+#else
+// 	template < typename T, typename... Args >
+// 	struct is_constructible;
+// 	template < typename T, typename... Args >
+// 	struct is_trivially_constructible;
+// 	template < typename T, typename... Args >
+// 	struct is_nothrow_constructible;
+#endif
+
+// TODO : implement if needed
+// 	template < typename T > 
+// 	struct is_default_constructible;
+// 	template < typename T > 
+// 	struct is_trivially_default_constructible;
+// 	template < typename T > 
+// 	struct is_nothrow_default_constructible;
+
+// 	namespace detail
+// 	{
+// 		template < typename T, bool = is_referenceable< T >::value >
+// 		struct is_copy_constructible_impl;
+// 		template < typename T >
+// 		struct is_copy_constructible_impl < T, false > : false_type{};
+// 		template < typename T > 
+// 		struct is_copy_constructible_impl < T, true > : is_constructible < T, const T& > { };
+// 		template < typename T, bool = is_referenceable< T >::value >
+// 		struct is_move_constructible_impl;
+// 		template < typename T >
+// 		struct is_move_constructible_impl < T, false > : false_type{};
+// 		template < typename T > 
+// 		struct is_move_constructible_impl < T, true > : is_constructible < T, T&& > { };
+// 	}
+
+// TODO : implement if needed
+// 	template < typename T > 
+// 	struct is_copy_constructible;
+// 	template < typename T > 
+// 	struct is_trivially_copy_constructible;
+// 	template < typename T > 
+// 	struct is_nothrow_copy_constructible;
+
+// TODO : implement if needed
+// 	template < typename T > 
+// 	struct is_move_constructible;
+// 	template < typename T > 
+// 	struct is_trivially_move_constructible;
+// 	template < typename T > 
+// 	struct is_nothrow_move_constructible;
+
+	namespace detail
+	{
+		template < typename T >
+		struct is_referenceable : bool_constant <
+			is_object<T>::value ||
+			is_reference<T>::value
+		> {};
+		template < typename R, typename... Args >
+		struct is_referenceable < R( Args... ) > : true_type {};
+#if NV_COMPILER != NV_MSVC
+		template < typename R, typename... Args >
+		struct is_referenceable < R( Args...... ) > : true_type {};
+#endif
+
+		template < typename To, typename From >
+		struct is_assignable_impl
+		{
+			struct lazy_int { lazy_int( int ) {} };
+
+			template < typename Dest, typename Source >
+			static auto test( int ) -> decltype( ( declval<Dest>() = declval<Source>() ), true_type() );
+
+			template < typename Dest, typename Source >
+			static auto test( lazy_int ) -> false_type;
+
+			typedef decltype( test< To, From > ( 0 ) ) type;
+		};
+
+		template <
+			typename From, typename To, 
+			bool Invalid = ( is_void<From>::value || is_function<To>::value || is_array <To>::value )
+		>
+		struct is_convertible_impl
+		{ 
+			typedef typename is_void<To>::type type;
+		};
+
+		template < typename From, typename To >
+		struct is_convertible_impl< From, To, false >
+		{
+			struct lazy_int { lazy_int( int ) {} };
+
+			template < typename Source >
+			static void test_target( Source );
+
+			template < typename Source, typename Dest >
+			static auto test( int ) -> decltype( test_target( declval<Source>() ), true_type() );
+
+			template < typename Source, typename Dest >
+			static auto test( lazy_int )->false_type;
+
+			typedef decltype( test< From, To >( 0 ) ) type;
+		};
+	}
+
+	template < typename To, typename From >
+	struct is_assignable : detail::is_assignable_impl< To, From >::type { };
+
+	namespace detail
+	{
+		template < typename T, bool = is_referenceable< T >::value >
+		struct is_copy_assignable_impl;
+		template < typename T >
+		struct is_copy_assignable_impl < T, false > : false_type{};
+		template < typename T >
+		struct is_copy_assignable_impl < T, true > : is_assignable < T, const T& > {};
+
+		template < typename T, bool = is_referenceable< T >::value >
+		struct is_move_assignable_impl;
+		template < typename T >
+		struct is_move_assignable_impl < T, false > : false_type{};
+		template < typename T >
+		struct is_move_assignable_impl < T, true > : is_assignable < T&, T&& >{};
+	}
+
+	template < typename T >
+	struct is_copy_assignable : detail::is_copy_assignable_impl < T > {};
+
+	template < typename T >
+	struct is_move_assignable : detail::is_move_assignable_impl < T > {};
+
+// TODO : implement if needed
+// 	template < typename T > 
+// 	struct is_trivially_assignable;
+// 	template < typename T > 
+// 	struct is_nothrow_assignable;
+// 	template < typename T > 
+// 	struct is_trivially_copy_assignable;
+// 	template < typename T > 
+// 	struct is_nothrow_copy_assignable;
+// 	template < typename T > 
+// 	struct is_trivially_move_assignable;
+// 	template < typename T > 
+// 	struct is_nothrow_move_assignable;
+// 	template < typename T > 
+// 	struct is_trivially_destructible;
+// 	template < typename T > 
+// 	struct is_nothrow_destructible;
+
+	template < typename T >	struct has_virtual_destructor  : bool_constant < __has_virtual_destructor( T ) > {};
+
+	template< typename T >
+	struct alignment_of	: integral_constant < size_t, NV_ALIGN_OF( typename remove_reference< T >::type ) > {};
+
+	template < typename T >
+	struct rank : integral_constant < size_t, 0 > {};
+	template < typename T >
+	struct rank<T[]> : integral_constant < size_t, rank<T>::value + 1 > {};
+	template < typename T, size_t N >
+	struct rank<T[N]> : integral_constant < size_t, rank<T>::value + 1 > {};
+
+	template < typename T, unsigned N = 0>
+	struct extent : integral_constant < size_t, 0 > {};
+	template < typename T>
+	struct extent<T[], 0> : integral_constant < size_t, 0 > {};
+	template < typename T, unsigned N >
+	struct extent<T[], N> : integral_constant < size_t, extent<T, N - 1>::value > {};
+	template < typename T, size_t N >
+	struct extent<T[N], 0> : integral_constant < size_t, N > {};
+	template < typename T, size_t I, unsigned N >
+	struct extent< T[I], N > : integral_constant < size_t, extent<T, N - 1>::value > {};
+
+	template < typename Base, typename Derived > 
+	struct is_base_of : bool_constant < __is_base_of( Base, Derived ) > {};
+
+#if NV_COMPILER == NV_MSVC 
+	template < typename From, typename To > 
+	struct is_convertible : bool_constant < __is_convertible_to( From, To ) > {};
+#else
+	template < typename From, typename To > 
+	struct is_convertible : detail::is_convertible_impl< From, To >::type {};
+#endif
+
+
+// TODO: non-standard, remove?
+	template < typename T >	struct has_trivial_constructor : bool_constant < __has_trivial_constructor( T ) || __is_pod( T ) > {};
+	template < typename T >	struct has_trivial_assign      : bool_constant < ( __has_trivial_assign( T ) || __is_pod( T ) ) && ( !is_volatile<T>::value && !is_const<T>::value ) > {};
+	template < typename T >	struct has_trivial_destructor  : bool_constant < __has_trivial_destructor( T ) || __is_pod( T ) > {};
+
+}
+
+#endif // NV_STL_TRAITS_PROPERTIES_HH
Index: /trunk/nv/stl/traits/transforms.hh
===================================================================
--- /trunk/nv/stl/traits/transforms.hh	(revision 377)
+++ /trunk/nv/stl/traits/transforms.hh	(revision 377)
@@ -0,0 +1,304 @@
+// Copyright (C) 2015 ChaosForge Ltd
+// http://chaosforge.org/
+//
+// This file is part of NV Libraries.
+// For conditions of distribution and use, see copyright notice in nv.hh
+/**
+* @file transforms.hh
+* @author Kornel Kisielewicz epyon@chaosforge.org
+* @brief type traits - transforms
+*/
+
+#ifndef NV_STL_TRAITS_TRANSFORMS_HH
+#define NV_STL_TRAITS_TRANSFORMS_HH
+
+#include <nv/core/common.hh>
+#include <nv/stl/traits/common.hh>
+#include <nv/stl/traits/primary.hh>
+
+namespace nv
+{
+
+	namespace detail
+	{
+
+		template< typename T, bool CONST, bool VOLATILE>
+		struct cv_selector;
+
+		template< typename T >
+		struct cv_selector < T, false, false > { typedef T type; };
+
+		template< typename T >
+		struct cv_selector < T, true, false > { typedef const T type; };
+
+		template< typename T >
+		struct cv_selector < T, false, true > { typedef volatile T type; };
+
+		template< typename T >
+		struct cv_selector < T, true, true > { typedef const volatile T type; };
+
+		template< typename SOURCE, typename TARGET,
+			bool CONST = is_const<SOURCE>::value,
+			bool VOLATILE = is_volatile<SOURCE>::value >
+		struct match_cv
+		{
+			typedef typename cv_selector< TARGET, CONST, VOLATILE >::type type;
+		};
+
+		template < typename T >
+		struct signed_type
+		{
+			typedef T type;
+		};
+
+		template<> struct signed_type < char > { typedef signed char type; };
+		template<> struct signed_type < unsigned char > { typedef signed char type; };
+		template<> struct signed_type < unsigned short > { typedef signed short type; };
+		template<> struct signed_type < unsigned int > { typedef signed int type; };
+		template<> struct signed_type < unsigned long > { typedef signed long type; };
+		template<> struct signed_type < unsigned long long > { typedef signed long long type; };
+
+		template < typename T >
+		struct unsigned_type
+		{
+			typedef T type;
+		};
+
+		template<> struct unsigned_type < char > { typedef unsigned char type; };
+		template<> struct unsigned_type < signed char > { typedef unsigned char type; };
+		template<> struct unsigned_type < signed short > { typedef unsigned short type; };
+		template<> struct unsigned_type < signed int > { typedef unsigned int type; };
+		template<> struct unsigned_type < signed long > { typedef unsigned long type; };
+		template<> struct unsigned_type < signed long long > { typedef unsigned long long type; };
+
+		template < typename T, bool IS_ENUM = is_enum< T >::value >
+		struct make_signed_impl;
+
+		template < typename T >
+		struct make_signed_impl < T, false >
+		{
+		private:
+			typedef signed_type< remove_cv_t<T> > signed_type_result;
+		public:
+			typedef match_cv< T, typename signed_type_result::type > type;
+		};
+
+		template < typename T >
+		struct make_signed_impl < T, true >
+		{
+		private:
+			static const bool size1test = sizeof( T ) <= sizeof( signed char );
+			static const bool size2test = sizeof( T ) <= sizeof( signed short );
+			static const bool size4test = sizeof( T ) <= sizeof( signed int );
+			typedef conditional_t<size4test, signed int, signed long> test4type;
+			typedef conditional_t<size2test, signed short, test4type> test2type;
+		public:
+			typedef conditional_t<size1test, signed char, test2type> type;
+		};
+
+		template < typename T, bool IS_ENUM = is_enum< T >::value >
+		struct make_unsigned_impl;
+
+		template < typename T >
+		struct make_unsigned_impl < T, false >
+		{
+		private:
+			typedef unsigned_type<remove_cv_t<T>> unsigned_type_result;
+		public:
+			typedef match_cv< T, typename unsigned_type_result::type > type;
+		};
+
+		template < typename T >
+		struct make_unsigned_impl < T, true >
+		{
+		private:
+			static const bool size1test = sizeof( T ) <= sizeof( unsigned char );
+			static const bool size2test = sizeof( T ) <= sizeof( unsigned short );
+			static const bool size4test = sizeof( T ) <= sizeof( unsigned int );
+			typedef conditional_t<size4test, unsigned int, unsigned long> test4type;
+			typedef conditional_t<size2test, unsigned short, test4type> test2type;
+		public:
+			typedef conditional_t<size1test, unsigned char, test2type> type;
+		};
+
+	}
+
+	template < typename T >
+	struct make_signed
+	{
+		typedef typename detail::make_signed_impl<T>::type type;
+	};
+
+	template <> struct make_signed < bool > ;
+
+	template < typename T >
+	using make_signed_t = typename make_signed<T>::type;
+
+	template < typename T >
+	struct make_unsigned
+	{
+		typedef typename detail::make_unsigned_impl<T>::type type;
+	};
+
+	template <> struct make_unsigned < bool > ;
+
+	template < typename T >
+	using make_unsigned_t = typename make_unsigned<T>::type;
+
+
+#if NV_COMPILER == NV_MSVC || NV_COMPILER == NV_CLANG
+	template < typename T >
+	struct underlying_type
+	{
+		typedef __underlying_type( T ) type;
+	};
+#else
+	template< typename T >
+	struct underlying_type
+	{
+		typedef typename conditional <
+			T( -1 ) < T( 0 ),
+			typename make_signed< T >::type,
+			typename make_unsigned< T >::type
+			> ::type type;
+	};
+#endif
+	template < typename T >
+	using underlying_type_t = typename underlying_type<T>::type;
+
+	namespace detail
+	{
+
+		template< typename T, bool IsEnum >
+		struct make_underlying_type_impl
+		{
+			typedef T type;
+		};
+
+		template< typename T >
+		struct make_underlying_type_impl< T, true >
+		{
+			typedef typename underlying_type<T>::type type;
+		};
+
+	}
+
+	template < typename T >
+	struct make_underlying_type
+	{
+		typedef typename detail::make_underlying_type_impl< T, is_enum<T>::value >::type type;
+	};
+
+	template < typename T >
+	using make_underlying_type_t = typename make_underlying_type<T>::type;
+
+	template< typename T >
+	struct decay
+	{
+		typedef remove_reference_t<T> U;
+		typedef conditional_t <
+			is_array<U>::value,
+			remove_extent_t<U>*,
+			conditional_t <
+				is_function<U>::value,
+				add_pointer_t<U>,
+				remove_cv_t<U>
+			>
+		> type;
+	};
+
+	template< typename T > 
+	using decay_t = typename decay<T>::type;
+
+	template <class ...T> struct common_type;
+
+	template < typename T >
+	struct common_type < T >
+	{
+		typedef typename decay<T>::type type;
+	};
+
+	template < typename T1, typename T2 >
+	struct common_type < T1, T2 >
+	{
+		typedef typename decay<
+			decltype( true ? declval<T1>() : declval<T2>()
+			)>::type type;
+	};
+
+	template < typename T1, typename T2, typename... Types >
+	struct common_type < T1, T2, Types... >
+	{
+		typedef typename common_type<
+			typename common_type<T1, T2>::type,
+			Types...>::type type;
+	};
+
+	template < typename... Types >
+	using common_type_t = typename common_type<Types...>::type;
+
+	namespace detail
+	{
+
+		template < typename F, typename... Args >
+		inline auto result_call( F&& f, Args&&... args )
+			-> decltype( forward<F>( f )( forward<Args>( args )... ) )
+		{
+			return forward<F>( f )( forward<Args>( args )... );
+		}
+
+		template < typename Base, typename T, typename Derived >
+		inline auto result_call( T Base::*pmd, Derived&& ref )
+			-> decltype( forward<Derived>( ref ).*pmd )
+		{
+			return forward<Derived>( ref ).*pmd;
+		}
+
+		template < typename PMD, typename Pointer >
+		inline auto result_call( PMD&& pmd, Pointer&& ptr )
+			-> decltype( ( *forward<Pointer>( ptr ) ).*forward<PMD>( pmd ) )
+		{
+			return ( *forward<Pointer>( ptr ) ).*forward<PMD>( pmd );
+		}
+
+		template < typename Base, typename T, typename Derived, typename... Args >
+		inline auto result_call( T Base::*pmf, Derived&& ref, Args&&... args )
+			-> decltype( ( forward<Derived>( ref ).*pmf )( forward<Args>( args )... ) )
+		{
+			return ( forward<Derived>( ref ).*pmf )( forward<Args>( args )... );
+		}
+
+		template < typename PMF, typename Pointer, typename... Args >
+		inline auto result_call( PMF&& pmf, Pointer&& ptr, Args&&... args )
+			-> decltype( ( ( *forward<Pointer>( ptr ) ).*forward<PMF>( pmf ) )( forward<Args>( args )... ) )
+		{
+			return ( ( *forward<Pointer>( ptr ) ).*forward<PMF>( pmf ) )( forward<Args>( args )... );
+		}
+
+		// TODO: fix this once compiler takes it
+		// 		template < typename, typename = void >
+		// 		struct result_of_impl {};
+		// 
+		// 		template < typename F, typename...Args >
+		// 		struct result_of_impl < F( Args... ),
+		// 			decltype( void( result_call( declval_i<F>(), declval_i<Args>()... ) ) ) >
+		// 		{
+		// 			using type = decltype( result_call( declval_i<F>(), declval_i<Args>()... ) );
+		// 		};
+
+		template < typename > struct result_of_impl;
+		template < typename F, typename... Args >
+		struct result_of_impl < F( Args... ) >
+		{
+			using type = decltype( result_call( declval<F>(), declval<Args>()... ) );
+		};
+	}
+
+	template < typename T >
+	struct result_of : detail::result_of_impl < T > {};
+
+	template < typename T >
+	using result_of_t = typename result_of<T>::type;
+}
+
+#endif // NV_STL_TRAITS_TRANSFORMS_HH
Index: /trunk/nv/stl/type_traits.hh
===================================================================
--- /trunk/nv/stl/type_traits.hh	(revision 376)
+++ /trunk/nv/stl/type_traits.hh	(revision 377)
@@ -9,7 +9,14 @@
  * @brief type traits
  */
-// TODO: "......" function match version?
-// TODO: remove typeinfo?
-
+// TODO : "......" function match version?
+// TODO : the following symbols are unimplemented:
+//  * is_constructible, is_trivially_constructible, is_nothrow_constructible
+//  * is_default_constructible, is_trivially_default_constructible, is_nothrow_default_constructible
+//  * is_copy_constructible, is_trivially_copy_constructible, is_copy_default_constructible
+//  * is_move_constructible, is_trivially_move_constructible, is_move_default_constructible
+//  * is_trivially_assignable, is_nothrow_assignable
+//  * is_trivially_copy_assignable, is_nothrow_copy_assignable
+//  * is_trivially_move_assignable, is_nothrow_move_assignable
+//  * is_destructible, is_trivially_destructible, is_nothrow_destructible
 
 #ifndef NV_STL_TYPE_TRAITS_HH
@@ -17,660 +24,10 @@
 
 #include <nv/core/common.hh>
-
-namespace nv
-{
-
-	template < typename T1, typename T2 >
-	struct is_same : false_type {};
-
-	template < typename T >
-	struct is_same < T, T > : true_type {};
-
-	template < typename T >
-	struct is_array : false_type {};
-
-	template < typename T, size_t N >
-	struct is_array < T[N] > : true_type {};
-
-	template < typename T >
-	struct is_array < T[] > : true_type {};
-
-	template < typename T >
-	struct is_lvalue_reference : false_type {};
-
-	template < typename T >
-	struct is_lvalue_reference < T& > : true_type{};
-
-	template < typename T >
-	struct is_rvalue_reference : false_type {};
-
-	template < typename T >
-	struct is_rvalue_reference < T&& > : true_type{};
-
-	template < typename _Ty>
-	struct is_reference : integral_constant < bool, is_lvalue_reference<_Ty>::value || is_rvalue_reference<_Ty>::value > {};
-
-	template < typename T >
-	struct is_enum : integral_constant < bool, __is_enum( T ) > {};
-
-	// TODO: these seem to simple compared to MSVC/GCC - so we'll leave them in
-	// detail - research why it is so.
-	template < typename T >
-	struct is_const : false_type {};
-	template < typename T >
-	struct is_const < T const > : true_type{};
-	template < typename T >
-	struct is_volatile : false_type {};
-	template < typename T >
-	struct is_volatile < T volatile > : true_type{};
-	// TODO END
-
-	template< typename T >
-	struct remove_reference
-	{
-		typedef T type;
-	};
-
-	template< typename T >
-	struct remove_reference < T& >
-	{
-		typedef T type;
-	};
-
-	template< typename T >
-	struct remove_reference < T&& >
-	{
-		typedef T type;
-	};
-
-	template< typename T >
-	struct remove_const
-	{
-		typedef T type;
-	};
-
-	template< typename T >
-	struct remove_const < const T >
-	{
-		typedef T type;
-	};
-
-	template< typename T >
-	struct remove_const < const T[] >
-	{
-		typedef T type[];
-	};
-
-	template< typename T, unsigned int N >
-	struct remove_const < const T[N] >
-	{
-		typedef T type[N];
-	};
-
-	template< typename T >
-	struct remove_volatile
-	{
-		typedef T type;
-	};
-
-	template< typename T >
-	struct remove_volatile < volatile T >
-	{
-		typedef T type;
-	};
-
-	template< typename T >
-	struct remove_volatile < volatile T[] >
-	{
-		typedef T type[];
-	};
-
-	template< typename T, unsigned int N >
-	struct remove_volatile < volatile T[N] >
-	{
-		typedef T type[N];
-	};
-
-	template< typename T >
-	struct remove_cv
-	{
-		typedef typename remove_const< typename remove_volatile<T>::type >::type
-			type;
-	};
-
-	template< typename T >
-	struct remove_cvr
-	{
-		typedef typename remove_cv< typename remove_reference<T>::type >::type
-			type;
-	};
-
-	template< typename T >
-	struct remove_pointer
-	{
-		typedef T type;
-	};
-
-	template< typename T > struct remove_pointer < T* >                { typedef T type; };
-	template< typename T > struct remove_pointer < T* const >          { typedef T type; };
-	template< typename T > struct remove_pointer < T* volatile >       { typedef T type; };
-	template< typename T > struct remove_pointer < T* const volatile > { typedef T type; };
-
-	template< typename T >
-	struct remove_extent
-	{	
-		typedef T type;
-	};
-
-	template< typename T, unsigned int N >
-	struct remove_extent < T[N] >
-	{
-		typedef T type;
-	};
-
-	template< typename T >
-	struct remove_extent < T[] >
-	{
-		typedef T type;
-	};
-
-	template< typename T >
-	struct remove_all_extents
-	{
-		typedef T type;
-	};
-
-	template< typename T, unsigned int N >
-	struct remove_all_extents < T[N] >
-	{
-		typedef typename remove_all_extents<T>::type type;
-	};
-
-	template< typename T >
-	struct remove_all_extents < T[] >
-	{
-		typedef typename remove_all_extents<T>::type type;
-	};
-
-	template< typename T >
-	struct add_pointer
-	{
-		typedef typename remove_reference<T>::type *type;
-	};
-
-	namespace detail
-	{
-		template< typename T, bool CONST, bool VOLATILE>
-		struct cv_selector;
-
-		template< typename T >
-		struct cv_selector < T, false, false > { typedef T type; };
-
-		template< typename T >
-		struct cv_selector < T, true, false > { typedef const T type; };
-
-		template< typename T >
-		struct cv_selector < T, false, true > { typedef volatile T type; };
-
-		template< typename T >
-		struct cv_selector < T, true, true > { typedef const volatile T type; };
-
-		template< typename SOURCE, typename TARGET,
-			bool CONST    = is_const<SOURCE>::value,
-			bool VOLATILE = is_volatile<SOURCE>::value >
-		struct match_cv
-		{
-			typedef typename cv_selector< TARGET, CONST, VOLATILE >::type type;
-		};
-
-		template < typename T > 
-		struct is_void_impl : false_type{};
-
-		template <>
-		struct is_void_impl< void > : true_type {};
-
-		template< typename T > 
-		struct is_integral_impl : false_type {};
-
-		template<> struct is_integral_impl< bool > : true_type {};
-		template<> struct is_integral_impl< char > : true_type {};
-		template<> struct is_integral_impl< signed char > : true_type {};
-		template<> struct is_integral_impl< unsigned char > : true_type {};
-		template<> struct is_integral_impl< wchar_t > : true_type {};
-		template<> struct is_integral_impl< signed short > : true_type {};
-		template<> struct is_integral_impl< unsigned short > : true_type {};
-		template<> struct is_integral_impl< signed int > : true_type {};
-		template<> struct is_integral_impl< unsigned int > : true_type {};
-		template<> struct is_integral_impl< signed long > : true_type {};
-		template<> struct is_integral_impl< unsigned long > : true_type {};
-		template<> struct is_integral_impl< signed long long > : true_type{};
-		template<> struct is_integral_impl< unsigned long long > : true_type{};
-
-		template< typename T > struct is_floating_point_impl : false_type {};
-
-		template<> struct is_floating_point_impl< float > : true_type{};
-		template<> struct is_floating_point_impl< double > : true_type{};
-		template<> struct is_floating_point_impl< long double > : true_type{};
-
-		template < typename T > 
-		struct signed_type
-		{
-			typedef T type;
-		};
-
-		template<> struct signed_type < char > { typedef signed char type; };
-		template<> struct signed_type < unsigned char > { typedef signed char type; };
-		template<> struct signed_type < unsigned short > { typedef signed short type; };
-		template<> struct signed_type < unsigned int > { typedef signed int type; };
-		template<> struct signed_type < unsigned long > { typedef signed long type; };
-		template<> struct signed_type < unsigned long long > { typedef signed long long type; };
-
-		template < typename T >
-		struct unsigned_type
-		{
-			typedef T type;
-		};
-
-		template<> struct unsigned_type < char > { typedef unsigned char type; };
-		template<> struct unsigned_type < signed char > { typedef unsigned char type; };
-		template<> struct unsigned_type < signed short > { typedef unsigned short type; };
-		template<> struct unsigned_type < signed int > { typedef unsigned int type; };
-		template<> struct unsigned_type < signed long > { typedef unsigned long type; };
-		template<> struct unsigned_type < signed long long > { typedef unsigned long long type; };
-
-		template < typename T, bool IS_ENUM = is_enum< T >::value >
-		struct make_signed_impl;
-
-		template < typename T >
-		struct make_signed_impl < T, false >
-		{
-		private:
-			typedef signed_type<typename remove_cv<T>::type> signed_type_result;
-		public:
-			typedef match_cv< T, typename signed_type_result::type > type;
-		};
-
-		template < typename T >
-		struct make_signed_impl < T, true >
-		{
-		private:
-			static const bool size1test = sizeof( T ) <= sizeof( signed char );
-			static const bool size2test = sizeof( T ) <= sizeof( signed short );
-			static const bool size4test = sizeof( T ) <= sizeof( signed int );
-			typedef typename conditional<size4test, signed int, signed long>::type test4type;
-			typedef typename conditional<size2test, signed short, test4type>::type test2type;
-		public:
-			typedef typename conditional<size1test, signed char, test2type>::type type;
-		};
-
-		template < typename T, bool IS_ENUM = is_enum< T >::value >
-		struct make_unsigned_impl;
-
-		template < typename T >
-		struct make_unsigned_impl < T, false >
-		{
-		private:
-			typedef unsigned_type<typename remove_cv<T>::type> unsigned_type_result;
-		public:
-			typedef match_cv< T, typename unsigned_type_result::type > type;
-		};
-
-		template < typename T >
-		struct make_unsigned_impl < T, true >
-		{
-		private:
-			static const bool size1test = sizeof( T ) <= sizeof( unsigned char );
-			static const bool size2test = sizeof( T ) <= sizeof( unsigned short );
-			static const bool size4test = sizeof( T ) <= sizeof( unsigned int );
-			typedef typename conditional<size4test, unsigned int, unsigned long>::type test4type;
-			typedef typename conditional<size2test, unsigned short, test4type>::type test2type;
-		public:
-			typedef typename conditional<size1test, unsigned char, test2type>::type type;
-		};
-	}
-
-	template <typename T> struct is_signed : false_type {};
-
-	template <> struct is_signed<signed char> : true_type {};
-	template <> struct is_signed<const signed char> : true_type {};
-	template <> struct is_signed<signed short> : true_type {};
-	template <> struct is_signed<const signed short> : true_type {};
-	template <> struct is_signed<signed int> : true_type {};
-	template <> struct is_signed<const signed int> : true_type {};
-	template <> struct is_signed<signed long> : true_type {};
-	template <> struct is_signed<const signed long> : true_type {};
-	template <> struct is_signed<signed long long> : true_type{};
-	template <> struct is_signed<const signed long long> : true_type{};
-
-	template <typename T> struct is_unsigned : false_type {};
-
-	template <> struct is_unsigned<unsigned char> : true_type{};
-	template <> struct is_unsigned<const unsigned char> : true_type{};
-	template <> struct is_unsigned<unsigned short> : true_type{};
-	template <> struct is_unsigned<const unsigned short> : true_type{};
-	template <> struct is_unsigned<unsigned int> : true_type{};
-	template <> struct is_unsigned<const unsigned int> : true_type{};
-	template <> struct is_unsigned<unsigned long> : true_type{};
-	template <> struct is_unsigned<const unsigned long> : true_type{};
-	template <> struct is_unsigned<unsigned long long> : true_type{};
-	template <> struct is_unsigned<const unsigned long long> : true_type{};
-
-	template <> struct is_signed<char> : integral_constant<bool, ( char( 0 ) > char( -1 ) ) >{};
-	template <> struct is_unsigned<char> : integral_constant<bool, ( char( 0 ) < char( -1 ) ) > {};
-
-
-	template < typename T >
-	struct make_signed
-	{
-		typedef typename detail::make_signed_impl<T>::type type;
-	};
-
-	template <> struct make_signed < bool > ;
-
-	template < typename T >
-	struct make_unsigned
-	{ 
-		typedef typename detail::make_unsigned_impl<T>::type type;
-	};
-	
-	template <> struct make_unsigned < bool > ;
-
-	template< typename T >
-	struct is_void : detail::is_void_impl < typename remove_cv<T>::type >
-	{
-	};
-
-	template< typename T > 
-	struct is_integral : detail::is_integral_impl< typename remove_cv<T>::type >
-	{
-	};
-
-	template< typename T > 
-	struct is_floating_point : detail::is_floating_point_impl< typename remove_cv<T>::type >
-	{
-	};
-
-	template < typename T >
-	struct is_arithmetic : integral_constant < bool,
-		is_integral<T>::value || is_floating_point<T>::value >
-	{
-	};
-
-	template <typename T>
-	struct is_fundamental : integral_constant < bool,
-		is_void<T>::value || is_integral<T>::value || is_floating_point<T>::value >
-	{
-	};
-
-#if NV_COMPILER == NV_MSVC || NV_COMPILER == NV_CLANG
-	template < typename T >
-	struct underlying_type
-	{
-		typedef __underlying_type( T ) type;
-	};
-#else
-	template< typename T >
-	struct underlying_type
-	{
-		typedef typename conditional <
-			T( -1 ) < T( 0 ),
-			typename make_signed< T >::type,
-			typename make_unsigned< T >::type
-			> ::type type;
-	};
-#endif
-
-	template <typename T>
-	struct is_empty : integral_constant < bool, __is_empty( T ) > {};
-
-	template < typename T >
-	struct is_pod : integral_constant < bool, __is_pod( T ) > {};
-
-	template < typename T >
-	struct has_trivial_constructor : integral_constant < bool, __has_trivial_constructor( T ) || __is_pod( T ) > {};
-
-#if NV_COMPILER == NV_MSVC
-	template < typename T >
-	struct has_trivial_copy : integral_constant < bool, ( __has_trivial_copy( T ) || __is_pod( T ) ) && !is_volatile<T>::value > {};
-#else
-	template < typename T >
-	struct has_trivial_copy : integral_constant < bool, ( __has_trivial_copy( T ) || __is_pod( T ) ) && ( !is_volatile<T>::value && !is_reference<T>::value ) > {};
-#endif
-
-	template < typename T >
-	struct has_trivial_assign : integral_constant < bool, ( __has_trivial_assign( T ) || __is_pod( T ) ) && ( !is_volatile<T>::value && !is_const<T>::value ) > {};
-
-	template < typename T >
-	struct has_trivial_destructor : integral_constant < bool, __has_trivial_destructor( T ) || __is_pod( T ) > {};
-
-	template < typename T >
-	struct has_virtual_destructor : integral_constant < bool, __has_virtual_destructor( T ) > {};
-
-
-	namespace detail
-	{
-
-		template < typename F >
-		struct function_traits_impl
-		{
-
-		};
-
-		template < typename R >
-		struct function_traits_impl< R (*)(void) >
-		{
-			typedef R (*type)();
-			typedef R        return_type;
-			typedef void     class_type;
-			static const int arg_count = 0;
-		};
-
-		template < typename R, typename... Args >
-		struct function_traits_impl < R(*)(Args...) >
-		{
-			typedef R(*type)( Args... );
-			typedef R        return_type;
-			typedef void     class_type;
-			static const int arg_count = sizeof...(Args);
-		};
-
-		template < class C, typename R >
-		struct function_traits_impl< R (C::*)() >
-		{
-			typedef R (*type)();
-			typedef R       return_type;
-			typedef C       class_type;
-			static const int arg_count = 0;
-		};
-
-		template < class C, typename R, typename... Args >
-		struct function_traits_impl < R(C::*)(Args...) >
-		{
-			typedef R(C::*type)(Args...);
-			typedef R        return_type;
-			typedef C        class_type;
-			static const int arg_count = sizeof...(Args);
-		};
-
-		template< typename T, typename IS_ENUM >
-		struct base_underlying_type_impl
-		{
-			typedef T type;
-		};
-
-		template< typename T >
-		struct base_underlying_type_impl < T, true_type >
-		{
-			typedef typename underlying_type<T>::type type;
-		};
-
-		template < typename T > struct is_pointer_impl : false_type {};
-
-		template < typename T > struct is_pointer_impl< T* > : true_type{};
-		template < typename T > struct is_pointer_impl< T* const > : true_type{};
-		template < typename T > struct is_pointer_impl< T* volatile > : true_type{};
-		template < typename T > struct is_pointer_impl< T* const volatile > : true_type{};
-
-	}
-
-	template < typename F >
-	struct function_traits : detail::function_traits_impl< F >
-	{
-
-	};
-
-	template < typename T >
-	struct return_type
-	{
-		typedef typename function_traits< T >::return_type type;
-	};
-
-	template < typename T >
-	struct memfn_class_type
-	{
-		typedef typename function_traits< T >::class_type type;
-	};
-
-	template < typename T >
-	struct base_underlying_type
-	{
-		typedef typename detail::base_underlying_type_impl< T, typename is_enum<T>::type >::type type;
-	};
-
-	template < typename F > struct is_function_pointer : false_type {};
-#if NV_COMPILER == NV_MSVC
-	template < typename R, typename... Args > struct is_function_pointer< R( __cdecl * )( Args... ) > : true_type{};
-	template < typename R, typename... Args > struct is_function_pointer< R( __stdcall * )( Args... ) > : true_type{};
-	template < typename R, typename... Args > struct is_function_pointer< R( __fastcall * )( Args... ) > : true_type{};
-	template < typename R, typename... Args > struct is_function_pointer< R( __vectorcall * )( Args... ) > : true_type{};
-#else
-	template < typename R, typename... Args > struct is_function_pointer< R( *)( Args... ) > : true_type{};
-#endif
-
-	template < typename C > struct is_member_function_pointer : false_type {};
-#if NV_COMPILER == NV_MSVC
-#define NV_IS_MEMFNPTR( call_conv ) \
-	template < typename R, typename C, typename... Args > struct is_member_function_pointer< R( call_conv C::* )( Args... ) > : true_type{}; \
-	template < typename R, typename C, typename... Args > struct is_member_function_pointer< R( call_conv C::* )( Args... ) const > : true_type{}; \
-	template < typename R, typename C, typename... Args > struct is_member_function_pointer< R( call_conv C::* )( Args... ) volatile > : true_type{}; \
-	template < typename R, typename C, typename... Args > struct is_member_function_pointer< R( call_conv C::* )( Args... ) const volatile > : true_type{};
-
-NV_IS_MEMFNPTR( __thiscall )
-NV_IS_MEMFNPTR( __cdecl )
-NV_IS_MEMFNPTR( __stdcall )
-NV_IS_MEMFNPTR( __fastcall )
-NV_IS_MEMFNPTR( __vectorcall )
-
-#undef NV_IS_MEMFNPTR
-#else
-	template < typename R, typename C, typename... Args > struct is_member_function_pointer< R( C::* )( Args... ) > : true_type{};
-	template < typename R, typename C, typename... Args > struct is_member_function_pointer< R( C::* )( Args... ) const > : true_type{};
-	template < typename R, typename C, typename... Args > struct is_member_function_pointer< R( C::* )( Args... ) volatile > : true_type{};
-	template < typename R, typename C, typename... Args > struct is_member_function_pointer< R( C::* )( Args... ) const volatile > : true_type{};
-#endif
-
-	template < typename F >	struct is_member_pointer : integral_constant < bool, is_member_function_pointer<F>::value > {};
-	template < typename C, typename R > struct is_member_pointer<R C::*> : true_type {};
-
-	template < typename T >
-	struct is_pointer : integral_constant< bool, (detail::is_pointer_impl<T>::value) && !(is_member_pointer<T>::value) > {};
-
-	template< typename T >
-	struct is_function : integral_constant< bool, is_function_pointer< typename remove_cv<T>::type *>::value > {};
-
-	template< typename T >
-	struct is_function < T& > : false_type {};
-
-	template< typename T >
-	struct is_function < T&& > : false_type {};
-
-	template< typename T >
-	struct decay
-	{
-		typedef typename remove_reference<T>::type U;
-		typedef typename conditional <
-			is_array<U>::value,
-			typename remove_extent<U>::type*,
-			typename conditional <
-				is_function<U>::value,
-				typename add_pointer<U>::type,
-				typename remove_cv<U>::type
-			> ::type
-		> ::type type;
-	};
-
-#if NV_COMPILER == NV_MSVC
-	typedef double max_align_t;
-#elif NV_PLATFORM == NV_APPLE
-	typedef long double max_align_t;
-#else
-	namespace detail
-	{
-		class aligned_dummy;
-		typedef void( *aligned_fptr )( );
-		typedef int( aligned_dummy::*aligned_memptr );
-		typedef int ( aligned_dummy::*aligned_memfptr )( );
-	}
-
-	union max_align_t
-	{
-		double                  dummy0;
-		long double             dummy1;
-		void*                   dummy2;
-		long long               dummy3;
-		detail::aligned_fptr    dummy4;
-		detail::aligned_memptr  dummy5;
-		detail::aligned_memfptr dummy6;
-	};
-#endif
-
-#if NV_COMPILER == NV_CLANG
-	template< typename T, size_t Size, size_t Align >
-	struct aligned_array
-	{
-		typedef T alignas( Align ) type[Size];
-	};
-#elif NV_COMPILER == NV_GNUC
- 	template< typename T, size_t Size, size_t Align >
- 	struct aligned_array
- 	{
-		typedef T __attribute__((aligned( Align ))) type[Size];
-	};
-#else
-	// TODO: remove this shit after moving to MSVC 2015
-	template< typename T, size_t Size, size_t Align >
-	struct aligned_array;
-
-	// According to LLVM ( https://llvm.org/svn/llvm-project/llvm/trunk/include/llvm/Support/AlignOf.h )
-	// MSVC has problems with align below 16...
-#define NV_ALIGNED_ARRAY(N) \
-	template< typename T, size_t Size > \
-	struct aligned_array< T, Size, N >  \
-	{ \
-		typedef __declspec( align(N) ) T type[Size]; \
-	}; 
-
-NV_ALIGNED_ARRAY( 1 )
-NV_ALIGNED_ARRAY( 2 )
-NV_ALIGNED_ARRAY( 4 )
-NV_ALIGNED_ARRAY( 8 )
-NV_ALIGNED_ARRAY( 16 )
-NV_ALIGNED_ARRAY( 32 )
-NV_ALIGNED_ARRAY( 64 )
-NV_ALIGNED_ARRAY( 128 )
-
-#undef NV_ALIGNED_ARRAY
-#endif
-
-	template< size_t Size, size_t Align = NV_ALIGN_OF( max_align_t ) >
-	struct aligned_storage
-	{
-		struct type
-		{
-			typename aligned_array< unsigned char, Size, Align >::type data;
-		};
-	};
-
-}
+#include <nv/stl/traits/common.hh>
+#include <nv/stl/traits/primary.hh>
+#include <nv/stl/traits/properties.hh>
+#include <nv/stl/traits/alignment.hh>
+#include <nv/stl/traits/transforms.hh>
+#include <nv/stl/traits/function.hh>
 
 #endif // NV_STL_TYPE_TRAITS_HH
Index: /trunk/nv/stl/utility.hh
===================================================================
--- /trunk/nv/stl/utility.hh	(revision 376)
+++ /trunk/nv/stl/utility.hh	(revision 377)
@@ -15,27 +15,8 @@
 
 #include <nv/core/common.hh>
-#include <nv/stl/type_traits.hh>
+#include <nv/stl/traits/common.hh>
 
 namespace nv
 {
-
-	template< typename T >
-	inline typename remove_reference<T>::type&& move( T&& arg ) NV_NOEXCEPT
-	{
-		return ( ( typename remove_reference<T>::type&& )arg );
-	}
-
-	template < typename T >
-	inline T&& forward( typename remove_reference<T>::type& t ) NV_NOEXCEPT
-	{
-		return static_cast<T&&>( t );
-	}
-
-	template < typename T >
-	inline T&& forward( typename remove_reference<T>::type&& t ) NV_NOEXCEPT
-	{
-		static_assert( !is_lvalue_reference<T>::value, "Can not forward an rvalue as an lvalue." );
-		return static_cast<T&&>( t );
-	}
 
 	// TODO: change to swap once you get rid of STL
