#include <type_traits>
int main()
{
std::decay<int()> p;
static_assert(1 == sizeof(p));
std::add_pointer<int> q;
static_assert(1 == sizeof(q));
}
This is working. But why do we need instances of decay
etc.? This makes typos (decay
instead of decay_t
etc.) harder to spot. Should these classes not have a private or deleted constructor?