#ifndef STD0X_COMMON_TYPE_H #define STD0X_COMMON_TYPE_H #pragma once #ifndef BOOST_TYPEOF_SILENT #define BOOST_TYPEOF_SILENT #include #undef BOOST_TYPEOF_SILENT #else #include #endif namespace std0x { template struct common_type { public: typedef typename common_type::type, V>::type type; }; // common_type template struct common_type { public: typedef T type; }; // common_type template struct common_type { private: static T m_t(); static U m_u(); static bool m_f(); // workaround gcc bug public: typedef BOOST_TYPEOF_TPL(m_f() ? m_t() : m_u()) type; }; // common_type } // std0x #endif