foreach range uses same logic as ?: for type deduction
Added another test case for char..char
Added another test case for wchar..wchar
Merge pull request #2538 from lionello/bug1878

foreach range uses same logic as ?: for type deduction