refactored iterator_range to better handle SFINAE.