Team LiB
Previous Section Next Section

Defined Terms

术语

binary function object(二元函数对象)

A class that has a function-call operator and represents one of the binary operators, such as one of the arithmetic or relational operators.

具有函数调用操作符且表示一个二元操作符(例如一个算术操作符或关系操作符)的类。

binder(绑定器)

An adaptor that binds an operand of a specified function object. For example, bind2nd(minus<int>(), 2) generates a unary function object that subtracts two from its operand.

绑定指定函数对象的一个操作数的适配器。例如,bind2nd(minus<int>(), 2) 产生一个一元函数对象,从操作灵长中减去 2。

class-type conversion(类类型转换)

Conversions to or from class types. Non-explicit constructors that take a single parameter define a conversion from the parameter type to the class type. Conversion operators define conversions from the class type to the type specified by the operator.

到类类型或从类类型的转换。接受一个形参的非显式构造函数定义从形参类型到类类型的转换。转换操作符定义从类类型到操作符所指定类型的转换。

conversion operators(转换操作符)

Conversion operators are member functions that define conversions from the class type to another type. Conversion operators must be a member of their class. They do not specify a return type and take no parameters. They return a value of the type of the conversion operator. That is, operator int returns an int, operator Sales_item returns a Sales_item, and so on.

转换操作符是定义从类类型到另一类型的转换的成员函数。转换操作符必须是类的成员,而且不能指定返回类型不能接受形参。转换操作符返回转换操作符类型的值,即,operator int 返回 int,operator Sales_item 返回 Sales_item,依此类推。

function adaptor(函数适配器)

Library type that provides a new interface for a function object.

为函数对象提供新接口的标准库的类型。

function object(函数对象)

Object of a class that defines an overloaded call operator. Function objects can be used where functions are normally expected.

定义了重载调用操作符的类的对象。函数对象可以用在需要函数的地方。

negator(求反器)

An adaptor that negates the value returned by the specified function object. For example, not2(equal_to<int>()) generates a function object that is equivalent to not_equal_to<int>.

将指定函数对象的返回值求反的适配器。例如,not2(equal_to<int>()) 产生与 not_equal_to<int> 等价的函数对象。

smart pointer(智能指针)

A class that defines pointer-like behavior and other functionality, such as reference counting, memory management, or more thorough checking. Such classes typically define overloaded versions of dereference (operator*) and member access (operator->).

一个类,定义了指针式行为和其他功能,如,引用计数、内存管理、更全面的检查等。这种类通常定义了解引用操作符(operator*)和成员访问操作符(operator->)的重载版本。

unary function object(一元函数对象)

A class that has a function-call operator and represents one of the unary operators, unary minus or logical NOT.

具有函数调用操作符且表示一个一元操作符的类,如一元减或逻辑非。

Team LiB
Previous Section Next Section