我在linux上使用GCC 4.1.2,STL必须是SGI STL.我写完之后:
#include <functional>
std::find_if(PirateFlush, PirateFlush + size,
compose2(std::logical_and<bool>(), bind2nd(std::greater<UInt32>(), time),
bind2nd(std::less<UInt32>(), now)));
Run Code Online (Sandbox Code Playgroud)
编译说:
错误:'compose2'未在此范围内声明
怎么了?
compose2不是标准的,既不在全局也不在std名称空间中.
gcc在__gnu_cxx命名空间中提供了一些非标准的SGI扩展.
使用__gnu_cxx::compose2或增强有许多这些预定义的.
-缺口
| 归档时间: |
|
| 查看次数: |
418 次 |
| 最近记录: |