Implement bug 317: use a template function call to suppress unused variable warnings.

--HG--
branch : 3.2