template restrictive upper bounds workaround