Standard Template Library Programmer's Guide

Здесь есть возможность читать онлайн «Standard Template Library Programmer's Guide» весь текст электронной книги совершенно бесплатно (целиком полную версию без сокращений). В некоторых случаях можно слушать аудио, скачать через торрент в формате fb2 и присутствует краткое содержание. Жанр: Программирование, Справочники, на английском языке. Описание произведения, (предисловие) а так же отзывы посетителей доступны на портале библиотеки ЛибКат.

Standard Template Library Programmer's Guide: краткое содержание, описание и аннотация

Предлагаем к чтению аннотацию, описание, краткое содержание или предисловие (зависит от того, что написал сам автор книги «Standard Template Library Programmer's Guide»). Если вы не нашли необходимую информацию о книге — напишите в комментариях, мы постараемся отыскать её.

This document contains reference on SGI STL implementation

Standard Template Library Programmer's Guide — читать онлайн бесплатно полную книгу (весь текст) целиком

Ниже представлен текст книги, разбитый по страницам. Система сохранения места последней прочитанной страницы, позволяет с удобством читать онлайн бесплатно книгу «Standard Template Library Programmer's Guide», без необходимости каждый раз заново искать на чём Вы остановились. Поставьте закладку, и сможете в любой момент перейти на страницу, на которой закончили чтение.

Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать

• less_equal

• logical_and

• logical_or

• logical_not

• subtractive_rng

• identity

• project1st

• project2nd

• select1st

• select2nd

• unary_function

• binary_function

• unary_compose

• binary_compose

• unary_negate

• binary_negate

• binder1st

• binder2nd

• pointer_to_unary_function

• pointer_to_binary_function

Functions

• compose1

• compose2

• not1

• not2

• bind1st

• bind2nd

• ptr_fun

Notes

[1] The reason for the name "adaptable function object" is that adaptable function objects may be used by function object adaptors.

[2] The unary_function and binary_function bases are similar to the input_iterator , output_iterator , forward_iterator , bidirectional_iterator , and random_access_iterator bases: they are completely empty, and serve only to provide type information.

[3] This is an example of how to use function objects; it is not the recommended way of calculating the sum of elements in a vector. The accumulate algorithm is a better way of calculating a sum.

Concepts

Generator

Category: functors

Component type: concept

Description

A Generator is a kind of function object: an object that is called as if it were an ordinary C++ function. A Generator is called with no arguments.

Refinement of

Assignable

Associated types
Result type The type returned when the Generator is called
Notation

FA type that is a model of Generator

ResultThe result type of F

fObject of type F

Definitions

The range of a Generator is the set of all possible value that it may return.

Valid expressions
Name Expression Return type
Function call f() Result
Expression semantics
Name Expression Semantics Postcondition
Function call f() Returns some value of type Result [1] The return value is in f 's range.
Models

• Result (*)()

Notes

[1] Two different invocations of f may return different results: a Generator may refer to local state, perform I/O, and so on. The expression f() is permitted to change f 's state; f might, for example, represent a pseudo-random number generator.

See also

Function Object overview, Unary Function, Binary Function, Adaptable Generator

Unary Function

Category: functors

Component type: concept

Description

A Unary Function is a kind of function object: an object that is called as if it were an ordinary C++ function. A Unary Function is called with a single argument.

Refinement of

Assignable

Associated types
Argument type The type of the Unary Function's argument.
Result type The type returned when the Unary Function is called
Notation

FA type that is a model of Unary Function

XThe argument type of F

ResultThe result type of F

fObject of type F

xObject of type X

Definitions

The domain of a Unary Function is the set of all permissible values for its argument.

The range of a Unary Function is the set of all possible values that it may return.

Valid expressions
Name Expression Return type
Function call f(x) Result
Expression semantics
Name Expression Precondition Semantics Postcondition
Function call f(x) x is in f 's domain Calls f with x as an argument, and returns a value of type Result [1] The return value is in f 's range
Models

• Result (*)(X)

Notes

[1] Two different invocations of f may return different results, even if f is called with the same arguments both times. A Unary Function may refer to local state, perform I/O, and so on. The expression f(x) is permitted to change f 's state.

See also

Function Object overview, Generator, Binary Function Adaptable Unary Function

Binary Function

Category: functors

Component type: concept

Description

A Binary Function is a kind of function object: an object that is called as if it were an ordinary C++ function. A Binary Function is called with two arguments.

Refinement of

Assignable

Associated types
First argument type The type of the Binary Function's first argument.
Second argument type The type of the Binary Function's second argument.
Result type The type returned when the Binary Function is called
Notation

FA type that is a model of BinaryFunction

XThe first argument type of F

YThe second argument type of F

ResultThe result type of F

fObject of type F

xObject of type X

yObject of type Y

Definitions

The domain of a Binary Function is the set of all ordered pairs (x, y) that are permissible values for its arguments.

The range of a Binary Function is the set of all possible value that it may return.

Valid expressions
Name Expression Return type
Function call f(x,y) Result
Expression semantics
Name Expression Precondition Semantics Postcondition
Function call f(x,y) The ordered pair (x,y) is in f 's domain Calls f with x and y as arguments, and returns a value of type Result [1] The return value is in f 's range
Models

• Result (*)(X,Y)

Читать дальше
Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать

Похожие книги на «Standard Template Library Programmer's Guide»

Представляем Вашему вниманию похожие книги на «Standard Template Library Programmer's Guide» списком для выбора. Мы отобрали схожую по названию и смыслу литературу в надежде предоставить читателям больше вариантов отыскать новые, интересные, ещё непрочитанные произведения.


Отзывы о книге «Standard Template Library Programmer's Guide»

Обсуждение, отзывы о книге «Standard Template Library Programmer's Guide» и просто собственные мнения читателей. Оставьте ваши комментарии, напишите, что Вы думаете о произведении, его смысле или главных героях. Укажите что конкретно понравилось, а что нет, и почему Вы так считаете.

x