首先是iterator traits,這個是用來萃取迭代器的特性的
_STL_ITERATOR_H_ #include <cstddef> forward_iterator_tag : bidirectional_iterator_tag : random_access_iterator_tag : template< Category, T, Distance = Pointer = T*, Reference = T&> template< Iterator> template< T> iterator_traits<T*> typedef T* typedef T& template< T> iterator_traits< T*> typedef T* typedef T& template< Iterator> iterator_category( Iterator& template< Iterator> inline typename Iterator::value_type* value_type( Iterator& static_cast<typename iterator_traits<Iterator>::value_type*>( template< Iterator> inline typename Iterator::difference_type* difference_type( Iterator& static_cast<typename iterator_traits<Iterator>::difference_type*>(
然後是type traits,這個是用來萃取c++語言型別(type)的特性的
_TYPE_TRAITS_H_ #include <iostream> _true_type { print(){ cout << << _false_type { print(){ cout << << template< T> template<> _type_traits<> template<> _type_traits<> template<> _type_traits<unsigned > template<> _type_traits<signed > template<> _type_traits<wchar_t> template<> _type_traits<> template<> _type_traits<unsigned > template<> _type_traits<> template<> _type_traits<unsigned > template<> _type_traits<> template<> _type_traits<unsigned > template<> _type_traits< > template<> _type_traits<unsigned > template<> _type_traits<> template<> _type_traits<> template<> _type_traits< > template< T> _type_traits<T*> template< T> _type_traits< T*> template<> _type_traits<*> template<> _type_traits<unsigned *> template<> _type_traits<signed *> template<> _type_traits< *> template<> _type_traits< unsigned *> template<> _type_traits< signed *>