文件名称:typeof_common
介绍说明--下载内容均来自于网络,请自行研究使用
typeof,编译时获取表达式类型运算符,是gcc编译器的一个扩展(intel编译器 也支持).
笔者最近作一个项目时需要用比较hack的手段把第三方的dll(无lib但有头文件)里面的外部函数以函数指针的方式提取出来给其他模块作全局变量用,500多个函数呀,声明函数指针可不是个轻松事,类型名字至少排满一行,写了50多个就受不了了.
找了boost的typeof,把里面的代码大幅度简化,提炼,去掉一些依赖.请使用TYPEOF宏,无任何运行时开销。
本版本利用了vc6的1个bug(子类可重定义父类内部类),2005的1个bug(子类可特化父类内部模版类,无语了吧),2008的的1个bug(typedef一下后可以继续使用2005的bug),2010据同事反映可以继续使用2008的 bug(倒)。整个vs系列就只有_MSC_VER==1310这种情况没有作了(我或者同事手头都没这个版本),欢迎大家完善。-typeof, compile-time type of operator to obtain an expression is an extension of the gcc compiler (intel compiler support).
I recently needed to make a project in a more hack means to a third party dll (no lib, but there are header files) inside external function to extract the function pointer of the way out to other modules for the global variables used, more than 500 functions ah, declare function pointer is not a easy thing, type the name of at least booked his party, has written more than 50 would not stand up.
Looking for a boost of typeof, to which the code greatly simplified, refined, and remove dependencies. Please use TYPEOF macro, without any run-time overhead.
This version use vc6 s a bug (sub-class can be re-defined within the class of the parent class), 2005, a bug (sub-class of specialized template class within the parent class, without saying a word the bar), 2008 of a bug (typedef can continue to use after about 2005 bug), 2010, according to colleagues, you can cont
笔者最近作一个项目时需要用比较hack的手段把第三方的dll(无lib但有头文件)里面的外部函数以函数指针的方式提取出来给其他模块作全局变量用,500多个函数呀,声明函数指针可不是个轻松事,类型名字至少排满一行,写了50多个就受不了了.
找了boost的typeof,把里面的代码大幅度简化,提炼,去掉一些依赖.请使用TYPEOF宏,无任何运行时开销。
本版本利用了vc6的1个bug(子类可重定义父类内部类),2005的1个bug(子类可特化父类内部模版类,无语了吧),2008的的1个bug(typedef一下后可以继续使用2005的bug),2010据同事反映可以继续使用2008的 bug(倒)。整个vs系列就只有_MSC_VER==1310这种情况没有作了(我或者同事手头都没这个版本),欢迎大家完善。-typeof, compile-time type of operator to obtain an expression is an extension of the gcc compiler (intel compiler support).
I recently needed to make a project in a more hack means to a third party dll (no lib, but there are header files) inside external function to extract the function pointer of the way out to other modules for the global variables used, more than 500 functions ah, declare function pointer is not a easy thing, type the name of at least booked his party, has written more than 50 would not stand up.
Looking for a boost of typeof, to which the code greatly simplified, refined, and remove dependencies. Please use TYPEOF macro, without any run-time overhead.
This version use vc6 s a bug (sub-class can be re-defined within the class of the parent class), 2005, a bug (sub-class of specialized template class within the parent class, without saying a word the bar), 2008 of a bug (typedef can continue to use after about 2005 bug), 2010, according to colleagues, you can cont
相关搜索: typeof
(系统自动生成,下载前可以参看下载内容)
下载文件列表
typeof_e.h