Ticket #5823: Properly count template parameters in TemplateSimplifier::useDefaultArgumentValues and handle casts in template parameters' default values.
Merge pull request #315 from simartin/ticket_5823

Ticket #5823: Properly count template parameters in TemplateSimplifier::useDefaultArgumentValues