Skip to content

Instantly share code, notes, and snippets.

@polyvertex
Created December 30, 2016 15:56
Show Gist options
  • Save polyvertex/0669fc7ba4a008991b91584bb391fdc2 to your computer and use it in GitHub Desktop.
Save polyvertex/0669fc7ba4a008991b91584bb391fdc2 to your computer and use it in GitHub Desktop.
An almighty std::decay<>
template <typename T>
struct super_decay
{
typedef
typename std::remove_cv<
typename std::remove_pointer<
typename std::remove_reference<
typename std::remove_extent<
typename std::decay<T>::type>::type>::type>::type>::type type;
};
template <typename T>
using super_decay_t = typename super_decay<T>::type;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment