#ifndef _FC_UTILITY_HPP_ #define _FC_UTILITY_HPP_ #include #include #define nullptr 0 typedef decltype(sizeof(int)) size_t; namespace std { typedef decltype(sizeof(int)) size_t; } namespace fc { template struct remove_reference { typedef T type; }; template struct remove_reference { typedef T type; }; template struct remove_reference { typedef const T type; }; template struct remove_reference { typedef T type; }; template typename fc::remove_reference::type&& move( T&& t ) { return static_cast::type&&>(t); } template inline T&& forward( U&& u ) { return static_cast(u); } namespace detail { template char is_class_helper(void(T::*)()); template double is_class_helper(...); } template struct is_class { enum { value = sizeof(char) == sizeof(detail::is_class_helper(0)) }; }; template void swap( T& a, T& b ) { T tmp = fc::move(a); a = fc::move(b); b = fc::move(tmp); } } #endif // _FC_UTILITY_HPP_