stl 语法错误,求解
// fo/compose11.h
#include <functional>
#include <iterator>
/* class for the compose_f_fx adapter
*/
template <class OP1,class OP2>
class compose_f_gx_t
: public std::unary_funcion<typename OP2::argument_type,
typename OP1::result_type>
{
private:
OP1 op1; // process:op1(op2(x))
OP2 op2;
public:
// constructor
compose_f_gx_t(const OP1& o1,const OP2& o2)
: op1(o1),op2(o2)
{
}
// function call
typename OP1::result_type
operator() (const typename OP2::argument_type& x) const
{
return op1(op2(x));
}
};
/* convenience functions for the compose_f_gx adapter
*/
template <class OP1,class OP2>
inline compose_f_gx_t<OP1,OP2>
compose_f_gx(const OP1& o1,const OP2& o2)
{
return compose_f_gx_t<OP1,OP2>(o1,o2);
}
这段代码有错误,但是我改不对,求助。
错误为:
\Page314\compose1.h|11|error: expected template-name before '<' token|
\Page314\compose1.h|11|error: expected '{' before '<' token|
\Page314\compose1.h|11|error: expected unqualified-id before '<' token|
相关推荐
动态规划例题 - 选自信息奥赛一本通
适合人群:学习C++学到动态规划的同学
Effective_STL
Sure, the STL has iterators, algorithms, and function objects, but for most C++ programmers, it's the containers that stand out. More powerful and flexible than arrays, they grow (and often shrink) dynamically, manage their own memory, keep track of how many objects they hold, bound the algorithmic complexity of the operations they support, and much, much more. Their popularity is easy to understand. They're simply better than their competition, regardless of whether that competition comes from containers in other libraries or is a container type you'd write yourself. STL containers aren't just good. They're really good.
西门子S7-300语句表(STL)编程手册.rar_300_STL_s7-300编程手册
西门子编程语言,学习西门子S300和400的常用
第十届蓝桥杯大学B组C/C++组真题
problemCB.pdf
S7-300SCL 编程手册
西门子SCL 编程手册使用及其规范。SCL编程语言简介。


