⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 memclass3.c

📁 linux下编程用 编译软件
💻 C
字号:
// PR c++/17132template <typename T>struct has_deref{    struct impl    {        template <            typename Type,            typename Type::reference (Type::*Func)(void) const>        struct func_tag;        template <typename Type>        static char (& test(            Type *,            func_tag<Type, &Type::operator*> * = 0        ))[2];        static char test(void *);    };    static const bool value = (sizeof(impl::test((T *) 0)) == 2);};template <typename T>struct container{    struct iterator    {        typedef T & reference;        reference operator*() const;    };};int main(){    typedef container<int>::iterator iter;    int result = has_deref<iter>::value;    return result;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -