Espacios de nombres
Variantes
Acciones

Member access operators

De cppreference.com
< cpp‎ | language

 
 
Lenguaje C++
Los temas generales
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.
Control de flujo
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.
Sentencias condicionales ejecución
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.
Instrucciones de iteración
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 declaraciones
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.
Funciones
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
declaración de la función
lambda declaración de la función
función de plantilla
especificador inline
especificaciones de excepción (obsoleto)
noexcept especificador (C++11)
Excepciones
Original:
Exceptions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Los espacios de nombres
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)
Los 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
almacenamiento duración especificadores
constexpr especificador (C++11)
auto especificador (C++11)
alignas especificador (C++11)
Inicialización
Original:
Initialization
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Los literales
Original:
Literals
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Expresiones
Original:
Expressions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
representaciones alternativas
Utilidades
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
alias de tipo de declaración (C++11)
atributos (C++11)
Lanza
Original:
Casts
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
conversiones implícitas
const_cast conversion
static_cast conversion
dynamic_cast conversion
reinterpret_cast conversion
C-cast estilo y funcional
De asignación de memoria
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.
Clases
Original:
Classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Clase propiedades específicas de la función
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.
Funciones especiales miembro
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.
Plantillas
Original:
Templates
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
clase de plantilla
función de plantilla
plantilla de especialización
paquetes de parámetros (C++11)
Varios
Original:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Montaje en línea
 
Accede a un miembro de un objeto .
Original:
Accesses a member of an object.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Operator name Syntax Over​load​able Prototype examples (for class T)
Inside class definition Outside class definition
array subscript a[b] Yes R& T::operator[](const T2& b); N/A
indirection (variable pointed to by a) *a Yes R& T::operator*(); R& operator*(T &a);
address of &a Yes R* T::operator&(); R* operator&(T &a);
member of object a.b No N/A N/A
member of pointer a->b Yes R* T::operator->() N/A
pointer to member of object a.*b No N/A N/A
pointer to member of pointer a->*b Yes R* T::operator->*(R) R* T::operator->*(T, R)
'Notas'
Original:
Notes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • Como con la mayoría de los definidos por el usuario sobrecargas, tipos de retorno debe coincidir con tipos de retorno proporcionados por los operadores orden interna de modo que los operadores definidos por el usuario se pueden utilizar de la misma manera como la empotrados. Sin embargo, en una definida por el usuario sobrecarga del operador, cualquier tipo puede ser utilizado como tipo de retorno (incluyendo void). Una excepción es operator->, que debe devolver un puntero .
    Original:
    As with most user-defined overloads, return types should match return types provided by the builtin operators so that the user-defined operators can be used in the same manner as the built-ins. However, in a user-defined operator overload, any type can be used as return type (including void). One exception is operator->, which must return a pointer.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.

Contenido

[editar] Explicación

Matriz' subíndice operador proporciona acceso a los elementos de la matriz interna
Original:
array subscript operator provides access to the elements in the internal array
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Indirecto', miembro de puntero y puntero a miembro de puntero proporciona a los operadores semántica puntero para cualquier objeto .
Original:
indirection, member of pointer and pointer to member of pointer operators provide pointer 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.
Miembro de puntero' y puntero a miembro de puntero operadores devuelven un puntero al objeto real que se utilizará para acceder miembro .
Original:
member of pointer and pointer to member of pointer operators return a pointer to the actual object which will be used for member access.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Construido en operador subíndice

Para cada tipo de objeto T (posiblemente cv-calificada), la firma de la función siguiente participa en la resolución de sobrecarga:
Original:
For every object type T (possibly cv-qualified), the following function signature participates 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.
T& operator[](T*, std::ptrdiff_t);
T& operator[](std::ptrdiff_t, T*);
Los operandos de puntero no puede ser una expresión de tipo integral o de enumeración sin ámbito, es convertir implícitamente a std::ptrdiff_t. El A[B] expresión es exactamente idéntica a la *(A+B) expresión, es decir, el operando de puntero (que puede ser el resultado de la conversión de matriz a puntero, y que debe apuntar a un elemento de array o una cierta más allá del final) se ajusta a punto a otro elemento de la misma matriz, siguiendo las reglas de aritmética de punteros, y después se eliminan las referencias .
Original:
The non-pointer operand may be any expression of integral or unscoped enumeration type, it is convertir implícitamente to std::ptrdiff_t. The expression A[B] is exactly identical to the expression *(A+B), that is, the pointer operand (which may be a result of array-to-pointer conversion, and which must point to an element of some array or one past the end) is adjusted to point at another element of the same array, following the rules of aritmética de punteros, and is then dereferenced.
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 a[4] = {1,2,3,4};
    int* p = &a[2];
    std::cout << p[1] << p[-1] << 1[p] << (-1)[p] << '\n';
}

Output:

4242

[editar] Construido en operador de indirección

Por cada T tipo que es ya sea de tipo de objeto (posiblemente cv-cualificada) o tipo de función (no const-o-ref cualificada), la firma de la función siguiente participa en la resolución de sobrecarga:
Original:
For every type T that is either object type (possibly cv-qualified) or function type (not const- or ref-qualified), the following function signature participates 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.
T& operator*(T*);
El operando del operador de indirección integrado es un puntero al objeto o función, y el resultado es el valor-que el puntero está señalando. Tenga en cuenta que un puntero a tipo incompleto puede dejar de hacer referencia, por ejemplo, cuando se inicializa una referencia .
Original:
The operand of the built-in indirection operator is a pointer to object or function, and the result is the lvalue that the pointer is pointing at. Note that a pointer to incomplete type can be dereferenced, e.g. when initializing a reference.
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 f() { return 42; }
int main()
{
    int n = 1;
    int* pn = &n;
 
    int& r = *pn;  // lvalue can be bound to a reference
    int m = *pn;   // indirection + lvalue-to-rvalue conversion
 
    int (*fp)() = &f;
    int (&fr)() = *fp; // function lvalue can be bound to a reference 
}


[editar] Construido en operador de dirección

El operando de la incorporada en el operator& es o bien una expresión de valor-de cualquier tipo o el nombre completo de una función miembro no estático / objeto de alguna clase. Este operador no participa en la resolución de sobrecarga, las reglas especiales se utilizan:
Original:
The operand of the built-in operator& is either an lvalue expression of any type or the qualified name of a non-static member function/object in some class. This operator does not participate in overload resolution, special rules are used:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Si el operando es una expresión de algún tipo lvalue T, operator& crea y devuelve un prvalue de T* tipo, con el mismo título cv, que se apunta al objeto designado por el operando. Si el operando tiene el tipo incompleto, el puntero se pueden formar, pero si ese tipo incompleto pasa a ser una clase que define su propio operator&, el comportamiento no está definido. Para los operandos del tipo definido por el usuario con operator&, std::addressof se puede utilizar para obtener el puntero verdad .
Original:
If the operand is an lvalue expression of some type T, operator& creates and returns a prvalue of type T*, with the same cv qualification, that is pointing at the object designated by the operand. If the operand has incomplete type, the pointer can be formed, but if that incomplete type happens to be a class that defines its own operator&, the behavior is undefined. For the operands of type with user-defined operator&, std::addressof may be used to obtain the true pointer.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Si el operando es el nombre de una función sobrecargada, la dirección sólo puede adoptarse si la sobrecarga se puede resolver debido al contexto, es decir, el resultado de operator&' se utiliza para inicializar un objeto, en una expresión de conversión en el lado izquierdo de una asignación, como un parámetro de la función o en una instrucción de retorno .
Original:
If the operand is the name of an overloaded function, the address may be taken only if the overload can be resolved due to context, that is, the result of operator& is used to initialize an object, in a cast expression, on the left of an assignment, as a function parameter or in a return statement.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Si el operando es un nombre calificado de un miembro no estático, por ejemplo, &Class::member, el resultado es un puntero a la función miembro prvalue o puntero al objeto miembro de T tipo en C clase. Tenga en cuenta que ni &member ni Class::member ni siquiera (&Class::member) se puede utilizar para inicializar un puntero a miembro .
Original:
If the operand is a qualified name of a non-static member, e.g. &Class::member, the result is a prvalue pointer to member function or pointer to member object of type T in class C. Note that neither &member nor Class::member nor even (&Class::member) may be used to initialize a pointer to member.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
void f(int) {}
void f(double) {}
struct A { int i; };
struct B { void f(); };
int main()
{
    int n = 1;
    int* pn = &n; // pointer
    int A::* mp = &A::i;  // pointer to member object
    void (B::*mpf)() = &B::f; // pointer to member function
 
//    auto pf2 = &f; // error: ambiguous overloaded function type
    void (*pf)(int) = &f; // overload resolution due to initialization
    auto pf2 = static_cast<void(*)(int)>(&f); // overload resolution due to cast
}


[editar] Construido en los operadores de acceso a miembros

El operando izquierdo de la incorporada en el operator. y operator-> es una expresión del tipo de clase completa T (por operator.) o puntero para completar T* tipo de clase (por operator->, que se evalúa antes que el operador puede ser llamado. El operando derecho es el nombre de un objeto miembro o función miembro de T o de una de las clases base T de, por ejemplo expr.member, opcionalmente calificado, expr.name::member por ejemplo, opcionalmente precedido por la palabra clave de plantilla', por ejemplo expr.template member .
Original:
The left operand of the built-in operator. and operator-> is an expression of complete class type T (for operator.) or pointer to complete class type T* (for operator->, which is evaluated before the operator can be called. The right operand is the name of a member object or member function of T or of one of T's base classes, e.g. expr.member, optionally qualified, e.g. expr.name::member, optionally prepended by the keyword template, e.g. expr.template member.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
A->B La expresión es exactamente equivalente a (*A).B para los tipos incorporados. Si un operator-> definido por el usuario se proporciona, operator-> se llama de nuevo en el valor que se devuelve, de forma recursiva, hasta que se alcanza el operator-> que devuelve un puntero normal. Después de eso, la semántica builtin se aplican a ese puntero .
Original:
The expression A->B is exactly equivalent to (*A).B for builtin types. If a user-defined operator-> is provided, operator-> is called again on the value that it returns, recursively, until the operator-> is reached that returns a plain pointer. After that, builtin semantics are applied to that pointer.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
expr.B En la expresión
Original:
In the expression expr.B,
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
1)
B si tiene T& tipo, el resultado es un valor-T .
Original:
if B has type T&, the result is an lvalue T.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
2)
B si es miembro de datos estáticos de T tipo, el resultado es un valor-T designar ese miembro de datos estáticos .
Original:
if B is a static data member of type T, the result is an lvalue T designating that static data member.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
3)
B si es un miembro no estático de datos de T tipo, el resultado es un valor-si expr es un valor-, el resultado es xValue si expr es un xValue, y el resultado es un prvalue lo contrario. B Si no se declara ser miembro' mutable, la cv-calificación del resultado es la unión de la CV-cualificación de expr y B. B Si es mutable, la cv-calificación del resultado es la unión de volátiles-calificaciones .
Original:
if B is a non-static data member of type T, the result is an lvalue if expr is an lvalue, the result is xvalue if expr is an xvalue, and the result is a prvalue otherwise. If B is not declared to be a mutable member, the cv-qualification of the result is the union of cv-qualifications of expr and B. If B is mutable, the cv-qualification of the result is the union of volatile-qualifications.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
4)
B si es una función miembro estática, el resultado es un valor-que designa la función memeber estática. Esencialmente, expr se evalúa y se desecha en este caso .
Original:
if B is a static member function, the result is an lvalue designating the static memeber function. Essentially, expr is evaluated and discarded in this case.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
5)
B si es una función miembro no estático, el resultado es un tipo especial prvalue de que sólo se puede utilizar como operando de la izquierda en una expresión de función de guardia, y para ningún otro propósito .
Original:
if B is a non-static member function, the result is a special kind of prvalue that can only be used as the left-hand operand in a function-call expression, and for no other purpose.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
6)
B si es un miembro de la enumeración, el resultado es un prvalue de la .
Original:
if B is a member enumeration, the result is a prvalue of the.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
7)
B si es un tipo anidado, el programa está mal formada (no se compila)
Original:
if B is a nested type, the program is ill-formed (won't compile)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
8)
expr si no tiene la clase de tipo escalar y B es el nombre del tipo o especificador decltype designación del mismo tipo (menos cv-calificaciones), entonces el resultado es un tipo especial de prvalue que sólo se puede utilizar como el operando de la izquierda en una expresión de función de guardia, y para ningún otro propósito. La llamada de función se llama llamada al destructor pseudo ', que no tiene argumentos, declaraciones, void y no realiza ninguna otra acción que la evaluación inicial de expr .
Original:
if expr has non-class scalar type and B is the type name or decltype specifier designating the same type (minus cv-qualifications), then the result is a special kind of prvalue that can only be used as the left-hand operand in a function-call expression, and for no other purpose. The function call is called pseudo destructor call', it takes no arguments, returns void, and performs no action other than initial evaluation of expr.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
#include <iostream>
template<typename T>
struct P { typedef T* ptr; };
template<typename T>
struct A {
    class B {};
    enum E {RED = 1, BLUE = 2};
    int n;
    static int sn;
    int f() { return 10+n; }
    static int fs() { return 4; }
    A(int n) : n(n) {}
 
    // keyword template needed to refer to a dependent template member
    void g() {
        T obj;
        int* p = obj.template ptr<int>;
        p->~T(); // T is int, this calls int's pseudo destructor
    }
};
template<> int A<P<int>>::sn = 2;
 
int main()
{
    A<P<int>> a(1);
    std::cout << a.n << ' '
              << a.sn << ' ' // << A::sn also works
              << a.f() << ' ' 
              << a.fs() << ' ' // A::fs() also works
              << a.RED << ' '  // nested type not allowed
//            << a.B  // nested type not allowed
              ;
}

Output:

1 2 11 4 1

[editar] Construido en operadores de acceso puntero a miembro

El operando derecho de ambos operator.* operator->* y es una expresión de tipo puntero al miembro de la clase T. Para operator.*, el operando de la izquierda es una expresión de T tipo de clase o de algunos clase derivada en la que es T base accesible sin ambigüedades. Para operator->*, el operando de la izquierda es un puntero a T o a su base .
Original:
The right operand of both operator.* and operator->* is an expression of type pointer to member in class T. For operator.*, the left operand is an expression of class type T, or of some derived class in which T is unambiguous accessible base. For operator->*, the left operand is a pointer to T or to its base.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Para cada combinación de tipos B, D, T, donde D es o bien el mismo que o B una clase derivada de B y T es o tipo de objeto o función, la firma de la función siguiente participa en la resolución de sobrecarga:
Original:
For every combination of types B, D, T, where D is either the same as B or a class derived from B, and T is either object or function type, the following function signature participates 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.
T& operator->*(B*, T D::*);
donde ambos operandos pueden ser cv-calificado, en cuyo caso el tipo de retorno de la cv-calificación es la unión de la. cv-calificación de los operandos .
Original:
where both operands may be cv-qualified, in which case the return type's cv-qualification is the union of the cv-qualification of the operands.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
E1->*E2 La expresión es exactamente equivalente a (*E1).*E2 para los tipos integrados .
Original:
The expression E1->*E2 is exactly equivalent to (*E1).*E2 for built-in types.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
expr.*ptr Para la expresión
Original:
For the expression expr.*ptr,
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
1)
Si el tipo de dinámica de expr no contiene el elemento al que se refiere ptr , el comportamiento no está definido
Original:
If the dynamic type of expr does not contain the member to which ptr refers, the behavior is undefined
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
2)
cv-calificación reglas son las mismas que para el operador de acceso para miembros, con una regla adicional:.. un puntero al miembro que se refiere a un mutable miembro no puede ser utilizado para modificar ese miembro en un objeto const .
Original:
cv-qualification rules are the same as for member access operator, with one additional rule: a pointer to member that refers to a mutable member cannot be used to modify that member in a const object.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
4)
Si es expr puntos rvalue y ptr a una función miembro con & ref-qualifier, el programa está mal formado
Original:
If expr is rvalue and ptr points to a member function with & ref-qualifier, the program is ill-formed
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
5)
expr Si es lvalue y puntos ptr a una función miembro con && ref-calificador, el programa está mal formada
Original:
If expr is lvalue and ptr points to a member function with && ref-qualifier, the program is ill-formed
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
6)
El resultado de expr.*ptr donde ptr es un puntero al miembro de datos tiene el mismo valor como categoría expr .
Original:
The result of expr.*ptr where ptr is a pointer to data member has the same value category as expr.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
7)
El resultado de expr.*ptr donde ptr es un puntero a la función miembro es un tipo de specail prvalue que sólo se puede utilizar como el argumento de la izquierda de una expresión de llamada a la función y para ningún otro propósito .
Original:
The result of expr.*ptr where ptr is a pointer to member function is a specail kind of prvalue that may only be used as the left-hand argument of a function call expression and for no other purpose.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
8)
ptr Si es un valor de puntero nulo, el comportamiento no está definido
Original:
If ptr is a null pointer value, the behavior is undefined
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
#include <iostream>
struct S
{
    mutable int mi;
    int f(int n) { return mi+n; }
    S(int n) : mi(n) {}
};
struct D : public S {
        D(int n) : S(n) {}
};
 
int main()
{
    int S::* pmi = &S::mi;
    int (S::*mpf)(int) = &S::f;
 
    const S s(7);
//    s.*pmi = 10; // cannot modify through mutable
    std::cout << s.*pmi << '\n';
 
    D d(7); // base pointers work with derived object
    D* dp = &d;
    std::cout << (d.*mpf)(7) << ' '
              << (dp->*mpf)(8) << '\n';
}

Output:

7
14 15

[editar] Biblioteca estándar

Operador subíndice está sobrecargado por muchas clases de contenedores estándar
Original:
Subscript operator is overloaded by many standard container classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
accede a poco específica
Original:
accesses specific bit
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(miembro público of std::bitset función) [edit]
proporciona acceso indexado a la matriz administrada
Original:
provides indexed access to the managed array
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(miembro público of std::unique_ptr función) [edit]
acceder carácter especificado
Original:
access specified character
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(miembro público of std::basic_string función) [edit]
acceder al elemento especificado
Original:
access specified element
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(miembro público of std::array función) [edit]
acceder al elemento especificado
Original:
access specified element
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(miembro público of std::deque función) [edit]
acceder al elemento especificado
Original:
access specified element
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(miembro público of std::vector función) [edit]
acceder al elemento especificado
Original:
access specified element
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(miembro público of std::map función) [edit]
acceder al elemento especificado
Original:
access specified element
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(miembro público of std::unordered_map función) [edit]
acceso a un elemento por su índice
Original:
accesses an element by index
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(miembro público of std::reverse_iterator función) [edit]
obtiene rvalue referencia al elemento indexado
Original:
obtains rvalue reference to indexed element
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(miembro público of std::move_iterator función)
obtener / establecer elemento valarray, sector u máscara
Original:
get/set valarray element, slice, or mask
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(miembro público of std::valarray función) [edit]
rendimientos especificados sub-partido
Original:
returns specified sub-match
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(miembro público of std::match_results función) [edit]
Los operadores de acceso indirección y miembro están sobrecargados por los iteradores y clases inteligentes puntero
Original:
The indirection and member access operators are overloaded by many iterators and smart pointer classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
desreferencia puntero al objeto gestionado
Original:
dereferences pointer to the managed object
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(miembro público of std::unique_ptr función) [edit]
desreferencia puntero al objeto gestionado
Original:
dereferences pointer to the managed object
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(miembro público of std::shared_ptr función) [edit]
acceso al objeto gestionado
Original:
accesses the managed object
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(miembro público of std::auto_ptr función)
devuelve una referencia a la presente raw_storage_iterator
Original:
returns a reference to this raw_storage_iterator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(miembro público of std::raw_storage_iterator función)
desreferencia el iterador subyacente disminuye
Original:
dereferences the decremented underlying iterator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(miembro público of std::reverse_iterator función) [edit]
no-op
(miembro público of std::back_insert_iterator función)
no-op
(miembro público of std::front_insert_iterator función)
no-op
(miembro público of std::insert_iterator función)
accede al elemento en punta-a
Original:
accesses the pointed-to element
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(miembro público of std::move_iterator función)
obtiene una copia de la corriente element
accesses un miembro del elemento actual
Original:
obtains a copy of the current element
accesses a member of the current element
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(miembro público of std::istream_iterator función)
no-op
(miembro público of std::ostream_iterator función)
obtiene una copia de la corriente character
accesses un miembro del carácter actual, si CharT tiene miembros
Original:
obtains a copy of the current character
accesses a member of the current character, if CharT has members
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(miembro público of std::istreambuf_iterator función)
no-op
(miembro público of std::ostreambuf_iterator función)
accede a los actuales match
accesses un miembro de la partida actual
Original:
accesses the current match
accesses a member of the current match
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(miembro público of std::regex_iterator función)
accede a la corriente result
accesses un miembro del resultado actual
Original:
accesses the current result
accesses a member of the current result
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(miembro público of std::regex_token_iterator función)
{{{1}}}
Original:
{{{2}}}
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Ver también

La precedencia de operadores

Common operators
asignación incrementNJdecrement aritmética lógico comparación memberNJaccess otro

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 convierte un tipo a otro tipo
compatible
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 convierte clase base virtual a class
derivada
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 convierte un tipo a otro compatible con diferentes 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 convierte el tipo de type
incompatible
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 asigna 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 desasigna 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 consulta el tamaño de un 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... consulta el tamaño de un parámetro de paquete (desde C++11)
Original:
sizeof... queries the size of a parámetro de paquete (desde 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 consulta la información de una 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 comprueba si una expresión puede lanzar una excepción (desde C++11)
Original:
noexcept checks if an expression can throw an exception (desde 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 consultas requisitos de alineación de un (desde C++11) tipo
Original:
alignof queries alignment requirements of a type (desde C++11)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.