Presently, I am using the following function template to suppress unused variable warnings:
template void unused(T const &) { /* Do n
It is a compiler bug and there are no known work arounds:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42655
It is fixed in v4.4.