文件名称:typeof
介绍说明--下载内容均来自于网络,请自行研究使用
typeof,编译时获取表达式类型运算符,是gcc编译器的一个扩展(intel编译器 也支持).
笔者最近作一个项目时需要用比较hack的手段把第三方的dll(无lib但有头文件)里面的外部函数以函数指针的方式提取出来给其他模块作全局变量用,500多个函数呀,声明函数指针可不是个轻松事,类型名字至少排满一行,写了50多个就受不了了.
找了boost的typeof,把里面的代码大幅度简化,提炼,去掉一些依赖.请使用TYPEOF宏,无任何运行时开销。
本版本利用了vc6的1个bug(子类重定义父类内部类),2003也可以使用,2005以后的版本不可用。本版本中前段注释掉的代码是原本笔者自己写的,和boost的代码有差距,而且需要手动注册类型,但是却是任何版本编译器都支持的!!
2005以后的版本我接下来会提供(已经写好,但是需要改动)。-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 more hack means to a third party dll (there is no lib but 不header file) inside external function has a way to extract a function pointer, more than 500 functions ah, declare the function pointer is not a easy thing Type the name of his party at least booked, 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 re-definition of the parent class within the class), 2003, you can use, the version is not available after 2005. This version of the preceding comment out the code is originally written by the author himself, and boost the code there are gaps, and need to manually register the type, but any version of the compiler support it! !
After 2
笔者最近作一个项目时需要用比较hack的手段把第三方的dll(无lib但有头文件)里面的外部函数以函数指针的方式提取出来给其他模块作全局变量用,500多个函数呀,声明函数指针可不是个轻松事,类型名字至少排满一行,写了50多个就受不了了.
找了boost的typeof,把里面的代码大幅度简化,提炼,去掉一些依赖.请使用TYPEOF宏,无任何运行时开销。
本版本利用了vc6的1个bug(子类重定义父类内部类),2003也可以使用,2005以后的版本不可用。本版本中前段注释掉的代码是原本笔者自己写的,和boost的代码有差距,而且需要手动注册类型,但是却是任何版本编译器都支持的!!
2005以后的版本我接下来会提供(已经写好,但是需要改动)。-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 more hack means to a third party dll (there is no lib but 不header file) inside external function has a way to extract a function pointer, more than 500 functions ah, declare the function pointer is not a easy thing Type the name of his party at least booked, 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 re-definition of the parent class within the class), 2003, you can use, the version is not available after 2005. This version of the preceding comment out the code is originally written by the author himself, and boost the code there are gaps, and need to manually register the type, but any version of the compiler support it! !
After 2
相关搜索: Hack
(系统自动生成,下载前可以参看下载内容)
下载文件列表
typeof.h