Espaços nominais
Variantes
Acções

Other operators

Da cppreference.com
< cpp‎ | language

 
 
Linguagem C++
Tópicos gerais
Original:
General topics
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Controle de fluxo
Original:
Flow control
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Declarações execução condicional
Original:
Conditional execution statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Instruções de iteração
Original:
Iteration statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Ir declarações
Original:
Jump statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Funções
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
declaração da função
lambda declaração da função
modelo de função
linha especificador
especificações de exceção (obsoleta)
noexcept especificador (C++11)
Exceções
Original:
Exceptions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Namespaces
Original:
Namespaces
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Tipos
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
decltype specifier (C++11)
Especificadores
Original:
Specifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
cv especificadores
armazenamento duração especificadores
constexpr especificador (C++11)
auto especificador (C++11)
alignas especificador (C++11)
Inicialização
Original:
Initialization
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Literais
Original:
Literals
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Expressões
Original:
Expressions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
representações alternativas
Utilitários
Original:
Utilities
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Tipos
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
typedef declaration
tipo de alias declaração (C++11)
atributos (C++11)
Conversões
Original:
Casts
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
conversões implícitas
const_cast conversion
static_cast conversion
dynamic_cast conversion
reinterpret_cast conversion
Elenco C-estilo e funcional
Alocação de memória
Original:
Memory allocation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Classes
Original:
Classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Classe propriedades específicas de função
Original:
Class-specific function properties
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Funções membro especiais
Original:
Special member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Modelos
Original:
Templates
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
modelo de classe
modelo de função
especialização de modelo
pacotes de parâmetros (C++11)
Diversos
Original:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Assembly embutido
 
Operator name Syntax Over​load​able Prototype examples (for class T)
Inside class definition Outside class definition
function call a(a1, a2) Yes R T::operator()(Arg1 &a1, Arg2 &a2, ... ...); N/A
comma a, b Yes T2& T::operator,(T2 &b); T2& operator,(const T &a, T2 &b);
conversion (type) a Yes operator type() N/A
ternary conditional a ? b : c No N/A N/A

Índice

[editar] Explicação

Chamada função de operador fornece semântica de função para qualquer objeto.
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.
' Operador de conversão converte determinado tipo para outro tipo. O nome do operador deve ser o mesmo que o tipo se destina a ser devolvido.
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.
' Operador ternário condicional verifica o valor booleano da primeira expressão e substitui cláusula operador inteiro com a segunda ou a terceira expressão, dependendo do valor resultante.
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.

[editar] Built-in operador de chamada de função

A expressão de chamada de função, tal como E(A1, A2, A3), consiste de uma expressão que nomeia a função E, seguido de uma lista, possivelmente vazia de A1, A2, A3, ... expressões, entre parênteses.
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.
A expressão que dá nome a função pode ser
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)
lvalue expressão que se refere a uma função
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)
ponteiro para função
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)
classe de acesso a membro expressão explícita que seleciona uma função de membro
Original:
explicit classe de acesso a membro 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)
implícita classe expressão acesso de membros, por exemplo, nome da função membro usado dentro de outra função membro.
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.
A função de nome (ou membro) especificado por E pode ser sobrecarregado, resolução de sobrecarga regras usadas para decidir qual é a sobrecarga de ser chamado.
Original:
The function (or member) name specified by E can be overloaded, resolução de sobrecarga 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.
Se E especifica uma função de membro, ele pode ser virtual, caso em que o overrider final dessa função será chamada, usando o despacho dinâmico em tempo de execução.
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.
Para chamar a função, todas as expressões A1, A2, A3, etc, fornecidos como argumentos são avaliados de forma arbitrária, e cada parâmetro de função é inicializado com seu argumento correspondente após conversão implícita se necessário. Se a chamada for feita para uma função membro, o ponteiro this ao objeto atual é convertido como que por conversão explícita para o ponteiro this esperado pela função. A inicialização e destruição de cada um dos parâmetros ocorre no contexto do chamador, o que significa, por exemplo, que, se um parâmetro de construtor lança uma excepção, os manipuladores de exceção definidas na função, assim como um bloco de função-tente, não são considerados. Se a função é uma função de aridade, argumento promoções padrão são aplicadas a todos os argumentos encontrados pelo parâmetro reticências.
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 conversão implícita 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, argumento promoções padrão 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.
O tipo de retorno de uma expressão chamada de função é o tipo de retorno da função escolhida, decidiu usando ligação estáticos (ignorando o virtual) palavra-chave), mesmo que a função primordial que é realmente chamado retorna um tipo diferente. Isto permite que as funções primordiais para retornar ponteiros ou referências a classes que são derivadas a partir do tipo de retorno devolvida pela função de base, isto é, C + + suportes covariantes tipos de retorno). Se E especifica um destrutor, o tipo de retorno é 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 covariantes tipos de retorno). 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.
A categoria de valor de uma chamada de função é expressão lvalue se a função retorna um lvalue referência ou uma referência de rvalue a função, é uma xValue se a função retorna um rvalue referência ao objecto, e é um prvalue contrário. Se a expressão de chamada de função é um prvalue do tipo de objeto, ele deve ser do tipo completa, exceto quando usado como um operando para 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.
Expressão de chamada de função é semelhante à sintaxe de inicialização T() valor, a expressão função estilo elenco T(A1), e para dirigir a inicialização de uma T(A1, A2, A3, ...) temporária, onde T é o nome de um tipo.
Original:
Function call expression is similar in syntax to value initialization T(), to função estilo elenco 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
}

Saída:

function called
7.000000

[editar] Built-in operador vírgula

Em um E1, E2 expressão vírgula, o E1 expressão é avaliada, o valor de retorno é descartado, e seus efeitos colaterais são concluídas antes da avaliação da expressão começa E2 (note que essa capacidade se perde com a definida pelo usuário 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.
O tipo de retorno e valor da categoria de operador de vírgula são exatamente o tipo de retorno ea categoria valor do segundo operando, 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.
A vírgula em várias listas separadas por vírgulas, como listas de argumentos de função (f(a, b, c)), listas de inicializador int a[] = {1,2,3}, ou declarações de inicialização (int i, j;) não é o operador vírgula. Se o operador vírgula precisa ser utilizada neste contexto, tem que estar entre parênteses: 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';
}

Saída:

n = 2
m = 7

[editar] Built-in operador de conversão

A built-in (T)expr operador de conversão avalia o expr expressão e executa conversão explícita para o T tipo.
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.
Veja conversão explícita para uma descrição detalhada.
Original:
See conversão explícita 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.

[editar] Operador condicional

Para cada par de aritmética promovido L e R e para cada tipo P, onde P é um ponteiro, ponteiro-para-membro, ou tipo de enumeração escopo, as assinaturas de função seguintes participar na resolução de sobrecarga:
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 );
onde RL é o resultado de conversões aritméticas usuais realizada em L e R. O operador ":?" Não pode ser sobrecarregado, essas assinaturas de função só existem com o propósito de resolução de sobrecarga.
Original:
where LR is the result of conversões aritméticas usuais 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.
O primeiro operando do operador condicional é avaliada e contextualmente convertido para bool. Depois de tanto a avaliação do valor e todos os efeitos secundários do primeiro operando forem concluídos, se o resultado foi true, o segundo operando é avaliado. Se o resultado foi false, o terceiro operando é avaliado.
Original:
The first operand of the conditional operator is evaluated and contextualmente convertido 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.
No E1 ? E2 : E3 expressão condicional, as seguintes regras e limitações:
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)
Se qualquer um ou E2 E3 (ou ambos) é um throw-expressão, o resultado do operador condicional é o resultado da expressão (não jogar) outro, e é um prvalue (após lvalue-to-rvalue, matriz-de-ponteiro ou função para ponteiro-conversão). Operador condicional como é comumente usado em constexpr programação.
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 constexpr programação.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
2)
Se ambos E2 ou E3 são de void tipo, o resultado é um tipo de 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 e E3 têm tipos de classes diferentes (ou mesmo tipo com diferentes cv-qualificação) ea categoria mesmo valor. Neste caso, é feita uma tentativa para converter um (e apenas um) dos operandos com o tipo do outro, como se segue:
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)
Se eles são lvalues, uma conversão implícita para o tipo de referência lvalue é tentada
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)
Se eles são XValues, uma conversão implícita para o tipo de referência rvalue é tentada
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)
Se forem rvalues, e têm a mesma classe base (ou um é uma classe de base da outra), o operando (s) são convertidos para o tipo base por cópia inicializar um objeto temporário do tipo base.
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)
Se forem rvalues, e não têm nenhuma classe de base comum, em seguida, uma conversão implícita é tentada para o tipo do outro operando.
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)
Ambos E2 ou E3 são glvalues ​​do mesmo tipo. Neste caso, o resultado tem o mesmo tipo e categoria valor.
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)
Se todos os casos listados acima falhar, e quer E2 ou E3 tem tipo de classe: a resolução de sobrecarga é uma tentativa de selecionar a melhor conversão de um tipo para o outro.
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)
Se todos os casos listados acima, não, e nem E2 nem E3 ter tipo de classe: primeiro, lvalue-a-rvalue, array para ponteiro, e função para-ponteiro conversões são aplicadas. Em seguida,
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)
se ambos E2 e E3 agora têm o mesmo tipo, o resultado é um prvalue temporária desse tipo, cópia inicializada a partir de qualquer operando foi selecionado depois de avaliar 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 e E3 têm aritmética ou tipo de enumeração: conversões aritméticas usuais são aplicados para trazê-los para o tipo comum, que é o tipo de resultado.
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 e E3 são ponteiros, ou um ponteiro e uma constante nula, ou ambas as constantes de ponteiro nulo, um dos quais é um std::nullptr_t, em seguida, as conversões de ponteiro e convrsions qualificação são aplicados ao trazê-los ao tipo comum, que é o tipo de resultado.
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 e E3 são ponteiros para membros, ou um ponteiro para membro e uma constante nula: então ponteiro-para-membro conversões e convrsions qualificação são aplicados para trazê-los para o tipo comum, que é o tipo
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");
}


[editar] Biblioteca padrão

Muitas classes da biblioteca padrão anular operator() a ser usado como função de objectos.
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.
Predefinição:cpp/utility/functional/function/dcl list operator()
Exclui o objeto ou matriz
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.

(of std::default_delete função pública membro)
compara seus argumentos usando proprietário baseados em semântica
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.

(função)
retorna a soma de dois argumentos
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.

(of std::plus função pública membro) [edit]
retorna a diferença entre dois argumentos
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.

(of std::minus função pública membro) [edit]
retorna o produto de dois argumentos
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.

(of std::multiplies função pública membro) [edit]
devolve o resultado da divisão do primeiro argumento pelo segundo argumento
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.

(of std::divides função pública membro) [edit]
retorna o resto da divisão do primeiro argumento pelo segundo argumento
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.

(of std::modulus função pública membro) [edit]
retorna a negação do argumento
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.

(of std::negate função pública membro) [edit]
Verifica se os argumentos são iguais
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.

(of std::equal_to função pública membro) [edit]
Verifica se os argumentos não são iguais
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.

(of std::not_equal_to função pública membro) [edit]
verifica se o primeiro argumento é maior do que o segundo
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.

(of std::greater função pública membro) [edit]
verifica se o primeiro argumento é menor que o segundo
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.

(of std::less função pública membro) [edit]
verifica se o primeiro argumento é maior que ou igual à segunda
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.

(of std::greater_equal função pública membro) [edit]
verifica se o primeiro argumento é menor que ou igual à segunda
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.

(of std::less_equal função pública membro) [edit]
retorna a lógica AND dos dois argumentos
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.

(of std::logical_and função pública membro) [edit]
retorna o OR lógico dos dois argumentos
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.

(of std::logical_or função pública membro) [edit]
retorna o NÃO lógico do argumento
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.

(of std::logical_not função pública membro) [edit]
returns the result of bitwise AND of two arguments
(of std::bit_and função pública membro) [edit]
retorna o resultado de bitwise OR de dois argumentos
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.

(of std::bit_or função pública membro) [edit]
retorna o resultado de bitwise XOR de dois argumentos
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.

(of std::bit_xor função pública membro) [edit]
retorna o complemento lógico de o resultado de uma chamada para o predicado armazenado
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.

(of std::unary_negate função pública membro) [edit]
retorna o complemento lógico de o resultado de uma chamada para o predicado armazenado
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.

(of std::binary_negate função pública membro) [edit]
chama a função armazenada
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.

(of std::reference_wrapper função pública membro) [edit]
lexicographically compares two strings using this locale's collate facet
(of std::locale função pública membro) [edit]
compara dois valores do tipo 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.

(of std::map::value_compare função pública membro) [edit]
compara dois valores do tipo 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.

(of std::multimap::value_compare função pública membro) [edit]
executa a função
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.

(of std::packaged_task função pública membro) [edit]
avanços do estado do motor e retorna o valor gerado
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.

(of std::linear_congruential_engine função pública membro) [edit]
gera o próximo número aleatório na distribuição
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.

(of std::uniform_int_distribution função pública membro) [edit]
Várias classes de biblioteca padrão fornecem funções definidas pelo usuário de conversão
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.
Predefinição:cpp/utility/functional/function/dcl list operator bool
verifica se o valor é diferente de zero
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.

(of std::error_code função pública membro)
verifica se o valor é diferente de zero
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.

(of std::error_condition função pública membro)
acessa o elemento da 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.

(of std::bitset::reference função pública membro)
acessa o elemento do vector <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.

(of std::vector<bool>::reference função pública membro)
verifica se existe é associado objeto gerenciado
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.

(of std::unique_ptr função pública membro) [edit]
verifica se existe é associado objeto gerenciado
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.

(of std::shared_ptr função pública membro) [edit]
acessa a referência armazenada
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.

(of std::reference_wrapper função pública membro)
converte o objeto em value_type, retorna 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.

(of std::integral_constant função pública membro)
(até C++11)
(desde C++11)
verifica se não ocorreu nenhum erro (sinônimo de !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.

(of std::basic_ios função pública membro) [edit]
converte para o tipo string subjacente
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.

(of std::sub_match função pública membro)
carrega um valor de um objeto atômico
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.

(of std::atomic função pública membro) [edit]
testa se o bloqueio é dono da sua mutex associado
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.

(of std::unique_lock função pública membro) [edit]
converte o ponteiro conseguiu um ponteiro para tipo diferente
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.

(of std::auto_ptr função pública membro)
O operador vírgula não é sobrecarregado por qualquer classe na biblioteca padrão. A biblioteca de impulso usa operator, em boost.assign, boost.spirit, e outras bibliotecas.
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.

[editar] Veja também

Precedência do operador

Operadores comuns
assinamento incremento
descremento
aritmético lógico comparação acesso
de membro
outros

a = b
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[b]
*a
&a
a->b
a.b
a->*b
a.*b

a(...)
a, b
? :

Operadores Especiais

static_cast converte um tipo a um outro tipo relacionado
dynamic_cast converte dentro de hierarquias de herança
const_cast adiciona ou remove qualificadores cv
reinterpret_cast converte tipo a tipo não relacionado
C-style cast converte um tipo a um outro por uma mistura de static_cast, const_cast, e reinterpret_cast
new cria objetos com duração de armazenamento dinâmico
delete destrói objetos anteriormente criads pela expressão new e libera área de memória obtida
sizeof pesquisa o tamanho de um tipo
sizeof... pesquisa o tamanho de um pacote de parâmetro (desde C++11)
typeid pesquisa a informação de tipo de um tipo
noexcept checa se uma expressão pode lançar uma exceção (desde C++11)
alignof pesquisa requerimentos de alinhamento de um tipo (desde C++11)