Skip to content

Instantly share code, notes, and snippets.

@VitaminaCPP
Created September 22, 2014 22:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VitaminaCPP/80ebbd905ef840bb47c7 to your computer and use it in GitHub Desktop.
Save VitaminaCPP/80ebbd905ef840bb47c7 to your computer and use it in GitHub Desktop.
int entero;
unsigned sin_signo;
void funcion(int f) {};
decltype(entero) v1; // copia el tipo int
decltype(sin_signo) v2; // copia el tipo unsigned int
decltype(funcion) v3; // copia el tipo void(int)
decltype(1. + 2.) v4; // copia el tipo double
decltype(1u / 2.f) v5; // copia el tipo float
decltype(&entero) v6; // copia el tipo int *
decltype(&v6) v7; // copia el tipo int **
decltype(1, 2., '3') v8; // copia el tipo char
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment