- template <class T = Iter, typename detail::IsCharPointer<T>::const_type = 0>
- Range(const fbstring& str, fbstring::size_type startFrom,
- fbstring::size_type size) {
- if (UNLIKELY(startFrom > str.size())) {
+ template <
+ class Container,
+ class = typename std::enable_if<
+ std::is_same<Iter, typename Container::const_pointer>::value>::type,
+ class = decltype(
+ Iter(std::declval<Container const&>().data()),
+ Iter(
+ std::declval<Container const&>().data() +
+ std::declval<Container const&>().size()))>
+ Range(
+ Container const& container,
+ typename Container::size_type startFrom,
+ typename Container::size_type size) {
+ auto const cdata = container.data();
+ auto const csize = container.size();
+ if (UNLIKELY(startFrom > csize)) {