[ Web Proxy ]
URL:
Viewing: http://pt.cppreference.com/cpp/container/array/tuple_size [Back]  [Original]

std::tuple_size(std::array) - cppreference.com
cppreference.com
Espaos nominais
Variantes

std::tuple_size(std::array)

De cppreference.com

<metanoindex/>

 
 
 
std::array
Funes de membro
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
acesso. Elemento
Original:
Element access
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
array::at
array::operator[]
array::front
array::back
array::data
Iteradores
Original:
Iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
array::begin
array::cbegin
array::end
array::cend
array::rbegin
array::crbegin
array::rend
array::crend
Capacidade
Original:
Capacity
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
array::empty
array::size
array::max_size
Modificadores
Original:
Modifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
array::fill
array::swap
No-membros funes
Original:
Non-member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Classes auxiliares
Original:
Helper classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
<tbody> </tbody>
Definido no cabealho <array>
template< class T, size_t N > class tuple_size< array<T, N> > : public integral_constant<size_t, N> { };
(1) (desde C++11)
Permite o acesso ao nmero de elementos de um std::array como uma expresso constante de tempo de compilao.
Original:
Provides access to the number of elements in an std::array as a compile-time constant expression.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Herdado de std::integral_constant

Member constants

value
[esttica]
N, the number of elements in the array
(membro esttico pblico constante)

Member functions

operator std::size_t
converte o objeto em std::size_t, retorna value
Original:
converts the object to std::size_t, returns value
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(funo pblica membro)

Member types

Tipo
Original:
Type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Definition
value_type std::size_t
type std::integral_constant<std::size_t, value>

Exemplo

#include <iostream>
#include <array>

template<class T>
void test(T t)
{
    int a[std::tuple_size<T>::value]; // can be used at compile time
    std::cout << std::tuple_size<T>::value << '\n';
}

int main()
{
    std::array<float, 3> arr;
    test(arr);
}

Sada:

3

Veja tambm

obtm o tamanho de tuple em tempo de compilao
Original:
obtains the size of tuple at compile time
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(especializao modelo. classe) [edit]

Web Proxy Viewer  |  New URL  |  Original Page