Index: trunk/nv/core/types.hh
===================================================================
--- trunk/nv/core/types.hh	(revision 369)
+++ trunk/nv/core/types.hh	(revision 370)
@@ -7,14 +7,9 @@
 
 #include <nv/core/common.hh>
-#include <nv/core/math.hh>
-#include <nv/core/cstring_store.hh>
-#include <nv/core/type_traits.hh>
-#include <typeinfo>
-#include <typeindex>
-#include <utility>
+#include <nv/stl/math.hh>
+#include <nv/stl/cstring_store.hh>
+#include <nv/stl/type_traits.hh>
 #include <unordered_map>
 #include <vector>
-#include <string>
-#include <cstddef>
 
 namespace nv
@@ -121,5 +116,5 @@
 		type_entry* get_type( const std::type_info& t )
 		{
-			type_info_map::iterator it = m_idx_types.find( std::type_index( t ) );
+			type_info_map::iterator it = m_idx_types.find( type_index( t ) );
 			if ( it != m_idx_types.end() )
 			{
@@ -140,5 +135,5 @@
 	private:
 		typedef std::vector<type_entry*>                         type_list;
-		typedef std::unordered_map<std::type_index, type_entry*> type_info_map;
+		typedef std::unordered_map<type_index, type_entry*> type_info_map;
 		cstring_store m_names;
 		type_list     m_type_list;
Index: trunk/nv/stl/type_traits.hh
===================================================================
--- trunk/nv/stl/type_traits.hh	(revision 369)
+++ trunk/nv/stl/type_traits.hh	(revision 370)
@@ -18,4 +18,6 @@
 #include <nv/core/common.hh>
 #include <type_traits>
+#include <typeinfo>
+#include <string>
 
 namespace nv
@@ -173,6 +175,58 @@
 	};
 
+	class type_index
+	{
+	public:
+		inline type_index( const std::type_info& info ) : m_type_info( &info ) {}
+		inline size_t hash_code() const { return m_type_info->hash_code(); }
+		inline const char *name() const { return m_type_info->name(); }
+
+		inline bool operator==( const type_index& rhs ) const
+		{
+			return ( *m_type_info == *rhs.m_type_info );
+		}
+
+		inline bool operator!=( const type_index& rhs ) const
+		{
+			return ( !( *this == rhs ) );
+		}
+
+		inline bool operator<( const type_index& rhs ) const
+		{
+			return ( m_type_info->before( *rhs.m_type_info ) );
+		}
+
+		inline bool operator>=( const type_index& rhs ) const
+		{
+			return ( !( *this < rhs ) );
+		}
+
+		inline bool operator>( const type_index& rhs ) const
+		{
+			return ( rhs < *this );
+		}
+
+		inline bool operator<=( const type_index& rhs ) const
+		{
+			return ( !( rhs < *this ) );
+		}
+
+	private:
+		const std::type_info* m_type_info;
+	};
 
 }
 
+namespace std
+{
+	template<>
+	struct hash< nv::type_index >
+	{
+		size_t operator()( nv::type_index key ) const
+		{
+			return ( key.hash_code() );
+		}
+	};
+}
+
 #endif // NV_CORE_TYPE_TRAITS_HH
