为什么我不能使用函数适配器compose2?

use*_*047 2 c++ stl sgi

我在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'未在此范围内声明

怎么了?

myt*_*gel 6

compose2不是标准的,既不在全局也不在std名称空间中.

gcc在__gnu_cxx命名空间中提供了一些非标准的SGI扩展.

使用__gnu_cxx::compose2或增强有许多这些预定义的.

-缺口