Пространства имён
Варианты
Действия

Other operators

Материал из cppreference.com

 
 
Язык С++
Общие темы
Управление программой
Операторы условного выполнения
Операторы повторения
Операторы перехода
Функции
объявление функции
объявление лямбда-функции
шаблон функции
спецификатор inline
спецификаторы исключений (устарело)
спецификатор noexcept (C++11)
Исключения
Пространства имён
объявление пространства имён
псевдонимы пространства имён
Типы
спецификатор decltype (C++11)
Спецификаторы
cv-спецификаторы
спецификаторы продолжительности хранения
спецификатор constexpr (C++11)
спецификатор auto (C++11)
спецификатор alignas (C++11)
Инициализация
Литералы
Выражения
Утилиты
Типы
typedef-объявление
объявление псевдонима типа (C++11)
атрибуты (C++11)
Приведения типов
неявные преобразования
const_cast-преобразование
static_cast-преобразование
dynamic_cast-преобразование
reinterpret_cast-преобразование
C-подобное и функциональное приведение типов
Выделение памяти
Классы
Особые свойства классовых функций
Специальные функции-члены
Шаблоны
шаблон класса
шаблон функции
специализация шаблона
упакованные параметры (C++11)
Разное
Ассемблерные вставки
 
Operator name Syntax Over​load​able Prototype examples (for class T)
Inside class definition Outside class definition
function call a(a1, a2) Да R T::operator()(Arg1 &a1, Arg2 &a2, ... ...); N/A
comma a, b Да T2& T::operator,(T2 &b); T2& operator,(const T &a, T2 &b);
conversion (type) a Да operator type() N/A
ternary conditional a ? b : c Нет N/A N/A

Содержание

[править] Объяснение

' Вызова функции оператор предоставляет функции семантики для любого объекта.
Original:
function call operator provides function semantics for any object.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
' Оператор преобразования преобразует данного типа в другой. Имя оператора должно быть таким же, как типа предназначены для возврата.
Original:
conversion operator converts given type to another type. The name of the operator must be the same as the type intended to be returned.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Тернарный условный оператор проверяет логическое значение первого выражения и заменяет весь пункт оператора со второго или третьего выражения в зависимости от полученного значения.
Original:
ternary conditional operator checks the boolean value of the first expression and replaces entire operator clause with the second or the third expression depending on the resulting value.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[править] Встроенная функция оператора вызова

Выражение вызова функции, такие как E(A1, A2, A3), состоит из выражения, которое называет функцию, E, после чего возможно пустой список A1, A2, A3, ... выражения в скобках.
Original:
A function call expression, such as E(A1, A2, A3), consists of an expression that names the function, E, followed by a possibly empty list of expressions A1, A2, A3, ..., in parentheses.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Выражение, которое называет функция может быть
Original:
The expression that names the function can be
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
a)
именующее выражение, которое относится к функции
Original:
lvalue expression that refers to a function
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
b)
Указатель на функцию
Original:
pointer to function
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
c)
явное выражение Класс доступа к члену, который выбирает функцию-член
Original:
explicit Класс доступа к члену expression that selects a member function
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
d)
неявные класса доступ к члену выражения, например, имя пользователя функция, используемая в другую функцию-член.
Original:
implicit class member access expression, e.g. member function name used within another member function.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Функция (или членов) имя, указанное E могут быть перегружены, Разрешение перегрузки правил, используемых решить, какие перегрузки будет называться.
Original:
The function (or member) name specified by E can be overloaded, Разрешение перегрузки rules used to decide which overload is to be called.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Если E определяет функции-члены, это может быть виртуальной, и в этом случае окончательное подмены этой функции будет вызван, с использованием динамической диспетчеризации во время выполнения.
Original:
If E specifies a member function, it may be virtual, in which case the final overrider of that function will be called, using dynamic dispatch at runtime.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Чтобы вызвать функцию, все выражения A1, A2, A3, и т.д., при условии, в качестве аргументов оценивается в произвольном порядке, и каждый параметр функции инициализируется соответствующий аргумент после неявного преобразования, если это необходимо. Если вызов сделан на функцию-член, то this указатель на текущий объект превращается как бы явное приведение к this указатель, ожидаемое функцией. Инициализацию и уничтожение каждого параметра происходит в контексте вызывающего, что означает, например, что если конструктор параметров генерирует исключение, обработчики исключений, определенных в функции, как и функции, попробуйте блока, не считаются. Если функция переменным числом функций, Акции аргумент по умолчанию применяются ко всем аргументам сопровождается многоточием параметра.
Original:
To call the function, all expressions A1, A2, A3, etc, provided as arguments are evaluated in arbitrary order, and each function parameter is initialized with its corresponding argument after неявного преобразования if neccessary. If the call is made to a member function, then the this pointer to current object is converted as if by explicit cast to the this pointer expected by the function. The initialization and destruction of each parameter occurs in the context of the caller, which means, for example, that if constructor of a parameter throws an exception, the exception handlers defined within the function, even as a function-try block, are not considered. If the function is a variadic function, Акции аргумент по умолчанию are applied to all arguments matched by the ellipsis parameter.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Тип возвращаемого выражения вызова функции возвращаемого типа выбранной функции, решили с использованием статического связывания (не обращая внимания на virtual) ключевое слово), даже если главная функция, которая на самом деле называется возвращает другой тип. Это позволяет переопределить функции возвращают указатели или ссылки на классы, которые являются производными от типа возвращаемого возвращается базу функции, т. е. C + + поддерживает ковариантной типы возвращения). Если E определяет деструктор, тип возвращаемого значения void.
Original:
The return type of a function call expression is the return type of the chosen function, decided using static binding (ignoring the virtual) keyword), even if the overriding function that's actually called returns a different type. This allows the overriding functions to return pointers or references to classes that are derived from the return type returned by the base function, i.e. C++ supports ковариантной типы возвращения). If E specifies a destructor, the return type is void.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Значение категории выражения вызова функции именующее если функция возвращает ссылку именующее или RValue ссылкой на функцию, является xvalue если функция возвращает RValue ссылку на объект, и prvalue иначе. Если выражение вызова функции является prvalue типа объекта, он должен иметь полную типа исключением случаев, когда используется в качестве операнда decltype.
Original:
The value category of a function call expression is lvalue if the function returns an lvalue reference or an rvalue reference to function, is an xvalue if the function returns an rvalue reference to object, and is a prvalue otherwise. If the function call expression is a prvalue of object type, it must have complete type except when used as an operand to decltype.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Выражение вызова функции похож на синтаксис инициализации значения T(), с выражением Функция стиле актеров T(A1), и направить инициализации временных T(A1, A2, A3, ...), где T это имя типа.
Original:
Function call expression is similar in syntax to value initialization T(), to Функция стиле актеров expression T(A1), and to direct initialization of a temporary T(A1, A2, A3, ...), where T is the name of a type.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
#include <cstdio>
struct S
{
    int f1(double d) {
        printf("%f \n", d); // variable argument function call
    }
    int f2() {
        f1(7); // member function call, same as this->f1()
               // integer argument converted to double
    }
};
void f() {
   puts("function called"); // function call
}
int main()
{
    f(); // function call
    S s;
    s.f2(); // member function call
}

Вывод:

function called
7.000000

[править] Встроенный оператор запятая

В E1, E2 выражения запятыми, выражение E1 оценивается, возвращаемое значение отбрасывается, и его побочные эффекты будут завершены до вычисления выражения E2 начинается (заметим, что эта способность теряется с заданными пользователем operator,).
Original:
In a comma expression E1, E2, the expression E1 is evaluated, its return value is discarded, and its side effects are completed before evaluation of the expression E2 begins (note that this ability is lost with user-defined operator,).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Тип возвращаемого значения и значения категории оператор запятой в точности тип возвращаемого значения и значения категории второго операнда, E2.
Original:
The return type and value category of the comma operator are exactly the return type and the value category of the second operand, E2.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Запятой в различные списки разделенных запятыми, такие как списки аргументов функции (f(a, b, c)), инициализатор списки int a[] = {1,2,3}, или инициализации отчетности (int i, j;) не является оператор запятой. Если оператор запятая должна быть использовано в этом контексте, он должен быть скобках: f(a, (n++, n+b), c)
Original:
The comma in various comma-separated lists, such as function argument lists (f(a, b, c)), initializer lists int a[] = {1,2,3}, or initialization statements (int i, j;) is not the comma operator. If the comma operator needs to be used in that context, it has to be parenthesized: f(a, (n++, n+b), c)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
#include <iostream>
int main()
{
    int n = 1;
    int m = (++n, std::cout << "n = " << n << '\n', ++n, 2*n);
    std::cout << "m = " << (++m, m) << '\n';
}

Вывод:

n = 2
m = 7

[править] Встроенный оператор преобразования

Встроенный оператор преобразования (T)expr вычисляет выражение expr и выполняет явное приведение к типу T.
Original:
The built-in conversion operator (T)expr evaluates the expression expr and performs explicit cast to the type T.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
См. явное приведение подробное описание.
Original:
See явное приведение for detailed description.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[править] Условный оператор

Для каждой пары способствовали арифметических типов L и R и для каждого типа P, где P является указателем, указателем на член, или областью типа перечисления, следующие функции подписи участие в разрешении перегрузки
Original:
For every pair of promoted arithmetic types L and R and for every type P, where P is a pointer, pointer-to-member, or scoped enumeration type, the following function signatures participate in overload resolution:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
LR operator?:(bool, L, R );
T operator?:(bool, T, T );
где LR является результатом обычные арифметические преобразования осуществляется на L и R. Оператор ":" не может быть перегружена, эти функции подписи существовать только в целях разрешения перегрузки.
Original:
where LR is the result of обычные арифметические преобразования performed on L and R. The operator “?:” cannot be overloaded, these function signatures only exist for the purpose of overload resolution.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Первый операнд условного оператора оценивается и контекстуально преобразованы в bool. После того, как оценка стоимости и все побочные эффекты первого операнда будут завершены, если результат был true, второй операнд. Если результат был false, третий операнд.
Original:
The first operand of the conditional operator is evaluated and контекстуально преобразованы to bool. After both the value evaluation and all side effects of the first operand are completed, if the result was true, the second operand is evaluated. If the result was false, the third operand is evaluated.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
В условном E1 ? E2 : E3 выражения, следующие правила и ограничения:
Original:
In the conditional expression E1 ? E2 : E3, the following rules and limitations apply:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
1)
Если Ваш E2 или E3 (или оба) throw выражение, результат условного оператора является результатом другой (не выбрасывать) выражение, и prvalue (после именующее к RValue, массив в указатель или функции в указатель преобразования). Такой условный оператор обычно используется в КонстВыраж программирования.
Original:
If either E2 or E3 (or both) is a throw-expression, the result of the conditional operator is the result of the other (not throw) expression, and is a prvalue (after lvalue-to-rvalue, array-to-pointer, or function-to-pointer conversion). Such conditional operator is commonly used in КонстВыраж программирования.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
2)
Если оба E2 или E3 имеют тип void, в результате prvalue типа void.
Original:
If both E2 or E3 are of type void, the result is a prvalue of type void.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
3)
E2 и E3 имеют различные типы класса (или же типа, с различным CV-квалификация) и той же категории ценности. В этом случае, попытка преобразовать один (и только один) из операндов к типу другого, а именно:
Original:
E2 and E3 have different class types (or same type with different cv-qualification) and the same value category. In this case, an attempt is made to convert one (and only one) of the operands to the type of the other, as follows:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
a)
Если они lvalues, неявное преобразование к типу ссылкой именующее попытка
Original:
If they are lvalues, an implicit conversion to the lvalue reference type is attempted
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
b)
Если они XValues, неявное преобразование к типу ссылкой RValue попытка
Original:
If they are xvalues, an implicit conversion to the rvalue reference type is attempted
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
c)
Если они rvalues, и имеют тот же базовый класс (или один является базовым классом других), операнд (ы) преобразуется в базовый тип, копирование инициализации временный объект базового типа.
Original:
If they are rvalues, and have the same base class (or one is a base class of the other), the operand(s) are converted to the base type by copy-initializing a temporary object of the base type.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
d)
Если они rvalues, и не имеют общего базового класса, то неявное преобразование пытался тип другого операнда.
Original:
If they are rvalues, and have no common base class, then an implicit conversion is attempted to the type of the other operand.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
4)
Оба E2 или E3 являются glvalues ​​того же типа. В этом случае результат имеет тот же тип и значение категории.
Original:
Both E2 or E3 are glvalues of the same type. In this case, the result has the same type and value category.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
5)
Если все случаи, перечисленные выше, не, и либо E2 или E3 имеет тип класса: разрешение перегрузки попытка выбрать лучшие преобразования из одного типа в другой.
Original:
If all cases listed above fail, and either E2 or E3 has class type: overload resolution is attempted to select the best conversion from one type to the other.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
6)
Если все случаи, перечисленные выше, не, и ни E2 ни E3 есть класс типа: во-первых, именующее к RValue, массива в указатель, и функция в указатель преобразования применяются. Тогда,
Original:
If all cases listed above fail, and neither E2 nor E3 have class type: first, lvalue-to-rvalue, array-to-pointer, and function-to-pointer conversions are applied. Then,
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
a)
если оба E2 и E3 теперь имеют одинаковый тип, то результат будет временным prvalue этого типа, копия инициализирован от того, что операнд был выбран после оценки E1
Original:
if both E2 and E3 now have the same type, the result is a prvalue temporary of that type, copy-initialized from whatever operand was selected after evaluating E1
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
b)
E2 и E3 иметь арифметический или перечисления типа: обычные арифметические преобразования применяются для приведения их к общему типу, что тип является результатом.
Original:
E2 and E3 have arithmetic or enumeration type: usual arithmetic conversions are applied to bring them to common type, that type is the result.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
c)
E2 и E3 являются указателями, или указатель и нулевой постоянной, или как нулевые константы указателю, одним из которых является std::nullptr_t, то преобразования указателей и квалификации convrsions применяются привести их к общему типу, что тип является результатом.
Original:
E2 and E3 are pointers, or a pointer and a null constant, or a both null pointer constants, one of which is a std::nullptr_t, then pointer conversions and qualification convrsions are applied to bring them to common type, that type is the result.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
d)
E2 и E3 являются указателями на члены, или указатель на член и пустая постоянно: то указатель-на-член преобразований и квалификации convrsions применяются привести их к общему типу, что тип
Original:
E2 and E3 are pointers to members, or a pointer to member and a null constant: then pointer-to-member conversions and qualification convrsions are applied to bring them to common type, that type is the
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
#include <string>
#include <stdexcept>
struct Node
{
    Node* next;
    int data;
    // deep-copying copy constructor
    Node(const Node& other)
      : next(other.next ? new Node(*other.next) : NULL)
      , data(other.data)
    {}
    Node(int d) : next(NULL), data(d) {}
    ~Node() { delete next ; }
};
int main()
{
    // simple rvalue example
    int n = 1>2 ? 10 : 11;  // 1>2 is false, so n = 11
    // simple lvalue example
    int m = 10;
    (n == m ? n : m) = 7; // n == m is false, so m = 7
    // throw example
    std::string str = 2+2==4 ? "ok" : throw std::logic_error("2+2 != 4");
}


[править] Стандартные библиотеки

Многие классы в стандартной библиотеке переопределить operator() для использования в качестве функциональных объектов.
Original:
Many classes in the standard library override operator() to be used as function objects.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
удаляет объект или массив
Original:
deletes the object or array
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::default_delete)
сравнивает свои аргументы, используя владелец основе семантики
Original:
compares its arguments using owner-based semantics
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(функция)
возвращает сумму двух аргументов
Original:
returns the sum of two arguments
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::plus) [edit]
Возвращает разницу между двумя аргументами
Original:
returns the difference between two arguments
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::minus) [edit]
Возвращает произведение двух аргументов
Original:
returns the product of two arguments
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::multiplies) [edit]
возвращает результат деления первого аргумента на второй аргумент
Original:
returns the result of the division of the first argument by the second argument
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::divides) [edit]
возвращает остаток от деления первого аргумента на второй аргумент
Original:
returns the remainder from the division of the first argument by the second argument
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::modulus) [edit]
возвращает отрицание аргумента
Original:
returns the negation of the argument
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::negate) [edit]
проверки, если аргументы равны
Original:
checks if the arguments are equal
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::equal_to) [edit]
проверки, если аргументы не равны
Original:
checks if the arguments are not equal
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::not_equal_to) [edit]
проверки, если первый аргумент больше второго
Original:
checks if the first argument is greater than the second
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::greater) [edit]
проверяет, является ли Первый аргумент меньше второго
Original:
checks if the first argument is less than the second
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::less) [edit]
проверки, если первый аргумент больше или равен второму
Original:
checks if the first argument is greater than or equal to the second
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::greater_equal) [edit]
проверки, если первый аргумент меньше или равен второму
Original:
checks if the first argument is less than or equal to the second
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::less_equal) [edit]
возвращает логическое И двух аргументов
Original:
returns the logical AND of the two arguments
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::logical_and) [edit]
возвращает логическое ИЛИ двух аргументов
Original:
returns the logical OR of the two arguments
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::logical_or) [edit]
возвращает логическое не аргумент
Original:
returns the logical NOT of the argument
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::logical_not) [edit]
returns the result of bitwise AND of two arguments
(public функция-член std::bit_and) [edit]
возвращает результат побитового ИЛИ от двух аргументов
Original:
returns the result of bitwise OR of two arguments
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::bit_or) [edit]
возвращает результат побитового XOR двух аргументов
Original:
returns the result of bitwise XOR of two arguments
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::bit_xor) [edit]
возвращает логическое дополнение результате вызова хранимой предикат
Original:
returns the logical complement of the result of a call to the stored predicate
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::unary_negate) [edit]
возвращает логическое дополнение результате вызова хранимой предикат
Original:
returns the logical complement of the result of a call to the stored predicate
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::binary_negate) [edit]
вызывает хранимую функцию
Original:
calls the stored function
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::reference_wrapper) [edit]
вызывает в створ
Original:
invokes the target
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::function)
lexicographically compares two strings using this locale's collate facet
(public функция-член std::locale) [edit]
сравнивает два значения типа value_type
Original:
compares two values of type value_type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::map::value_compare) [edit]
сравнивает два значения типа value_type
Original:
compares two values of type value_type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::multimap::value_compare) [edit]
выполняет функцию
Original:
executes the function
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::packaged_task) [edit]
достижения состояния двигателя и возвращает сгенерированное значение
Original:
advances the engine's state and returns the generated value
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::linear_congruential_engine) [edit]
создает следующее случайное число в распределении
Original:
generates the next random number in the distribution
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::uniform_int_distribution) [edit]
Несколько стандартных классов библиотека предоставляет пользовательские функции преобразования
Original:
Several standard library classes provide user-defined conversion functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
проверки, если значение не равно нулю
Original:
checks if the value is non-zero
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::error_code)
проверки, если значение не равно нулю
Original:
checks if the value is non-zero
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::error_condition)
доступ к элементу BitSet
Original:
accesses the element of the bitset
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::bitset::reference)
доступ к элементу вектора <bool>
Original:
accesses the element of the vector<bool>
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::vector<bool>::reference)
проверяет, не связан управляемого объекта
Original:
checks if there is associated managed object
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::unique_ptr) [edit]
проверяет, не связан управляемого объекта
Original:
checks if there is associated managed object
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::shared_ptr) [edit]
доступ к сохраненной ссылке
Original:
accesses the stored reference
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::reference_wrapper)
проверяет, является ли действительным цель содержится
Original:
checks if a valid target is contained
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::function)
преобразует объект в value_type, возвращает value
Original:
converts the object to value_type, returns value
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::integral_constant)
(до C++11)
(начиная с C++11)
проверки, если не произошла ошибка (синоним !fail())
Original:
checks if no error has occurred (synonym of !fail())
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::basic_ios) [edit]
преобразуется в базовый тип строки
Original:
converts to the underlying string type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::sub_match)
загружает значение из атомного объекта
Original:
loads a value from an atomic object
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::atomic) [edit]
Тесты ли замок принадлежит связанных мьютекс
Original:
tests whether the lock owns its associated mutex
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::unique_lock) [edit]
преобразует управляемый указатель на указатель на другой тип
Original:
converts the managed pointer to a pointer to different type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(public функция-член std::auto_ptr)
Оператор запятая не перегружен любого класса в стандартной библиотеке. Повышение библиотека использует operator, в boost.assign, boost.spirit и других библиотек.
Original:
The comma operator is not overloaded by any class in the standard library. The boost library uses operator, in boost.assign, boost.spirit, and other libraries.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[править] См. также

Приоритет операторов

Common operators
назначение incrementNJdecrement арифметики логичной сравнение memberNJaccess другие

a = b
a = rvalue
a += b
a -= b
a *= b
a /= b
a %= b
a &= b
a |= b
a ^= b
a <<= b
a >>= b

++a
--a
a++
a--

+a
-a
a + b
a - b
a * b
a / b
a % b
~a
a & b
a | b
a ^ b
a << b
a >> b

!a
a && b
a || b

a == b
a != b
a < b
a > b
a <= b
a >= b

a[b]
*a
&a
a->b
a.b
a->*b
a.*b

a(...)
a, b
(type) a
? :

Special operators
static_cast преобразует один тип на другой совместимый
типа
Original:
static_cast converts one type to another compatible type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
dynamic_cast преобразует виртуальный базовый класс для производных class
Original:
dynamic_cast converts virtual base class to derived class
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
const_cast преобразует тип совместимого типа с различными cv qualifiers
Original:
const_cast converts type to compatible type with different cv qualifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
reinterpret_cast преобразует тип несовместимы type
Original:
reinterpret_cast converts type to incompatible type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
new выделяет memory
Original:
new allocates memory
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
delete освобождает memory
Original:
delete deallocates memory
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
sizeof запрашивает размер type
Original:
sizeof queries the size of a type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
sizeof... запрашивает размер Параметр пакета (начиная с C++11)
Original:
sizeof... queries the size of a Параметр пакета (начиная с C++11)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
typeid запрашивает сведения о типе type
Original:
typeid queries the type information of a type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
noexcept проверяет выражение может вызвать исключение (начиная с C++11)
Original:
noexcept checks if an expression can throw an exception (начиная с C++11)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
alignof запросов выравнивание требований типа (начиная с C++11)
Original:
alignof queries alignment requirements of a type (начиная с C++11)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.