alignment_of Class
Obtém o alinhamento do texto.
template<class Ty>
struct alignment_of;
Parâmetros
- Ty
O tipo de consulta.
Comentários
A consulta do tipo contém o valor do o alinhamento do tipo Ty.
Exemplo
// std_tr1__type_traits__alignment_of.cpp
// compile with: /EHsc
#include <type_traits>
#include <iostream>
typedef std::aligned_storage<sizeof (int),
std::alignment_of<double>::value>::type New_type;
int main()
{
std::cout << "alignment_of<int> == "
<< std::alignment_of<int>::value << std::endl;
std::cout << "aligned to double == "
<< std::alignment_of<New_type>::value << std::endl;
return (0);
}
Requisitos
Cabeçalho: <type_traits>
Namespace: std