I'll answer my own question. While it does compile, it will not run. So no, this is not valid syntax.
edit: It's no longer compiling either. I'm not sure why it did before.
Last edited on
std::make_unsigned would work, if that is what you were trying to achieve
1 2 3 4 5 6 7
|
#include <type_traits>
template<class T>
void function ( T item )
{
typename std::make_unsigned<T>::type willThisWork;
}
|
Last edited on
Yes, that is what I wanted. Thank you.