template<class C, typename T> class C { public: inline operator T() const { return m_value; } private: T m_value; };