A way to suppress the warning generated from the following would be a welcome
addition. A solution was proposed in , but I'd like a cleaner approach. I
believe suppressing the warning for a template parameter is the cleanest way to
dispose of the warning.
template< class T >
SomeClass<T>::SomeFunc(const T& t)
// warning: comparison of unsigned expression < 0 is always false
if(t < 0)
Summary: Warning Suppression: C++ Templates, Unsigned, and
"comparison of unsigned expression < 0 is always false"
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: noloader at gmail dot com