별의 공부 블로그 🧑🏻‍💻
728x90
728x170

*[header][other] functional


<functional>

Function objects
Function objects are objects specifically designed to be used with a syntax similar to that of functions. In C++, this is achieved by defining member function operator() in their class, like for example:
1
2
3
4
struct myclass {
  int operator()(int a) {return a;}
} myobject;
int x = myobject (0);           // function-like syntax with object myobject 


They are typically used as arguments to functions, such as predicates or comparison functions passed to standard algorithms.

Base classes


Operator classes

Arithmetic operations:

Comparison operations:

Logical operations:

Adaptor and conversion functions

Negators
Parameter binders
Conversors

Instrumental types


Functions

These functions create objects of wrapper classes based on its arguments:

Classes


Wrapper classes

Wrapper classes are classes that hold an object and have an interface similar to that object, but adding or changing some of its features:

Operator classes

Operator classes are classes that define functional objects that call operators:

Other classes


Namespaces



내용 출처 : http://www.cplusplus.com/reference/functional/

728x90
그리드형(광고전용)

'Programming > C++' 카테고리의 다른 글

[header][other] locale  (0) 2017.11.08
[header][other] limits  (0) 2017.11.08
[header][other] iterator  (0) 2017.11.08
[header][other] initializer_list (C++11)  (0) 2017.11.08
[header][other] exception  (0) 2017.11.08
[header][other] complex  (0) 2017.11.08
[header][other] codecvt (C++11)  (0) 2017.11.08
[header][other] chrono (C++11)  (0) 2017.11.08
⚠️AdBlock이 감지되었습니다. 원할한 페이지 표시를 위해 AdBlock을 꺼주세요.⚠️


📖 Contents 📖