11#ifndef _LIBCPP_LFTS_STRING_VIEW 
   12#define _LIBCPP_LFTS_STRING_VIEW 
   14#ifndef RWrap_libcpp_string_view_h 
   15#error "Do not use libcpp_string_view.h directly. #include \"RWrap_libcpp_string_view.h\" instead." 
  192#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 
  193#pragma GCC system_header 
  198    template<
class _CharT, 
class _Traits = _VSTD::
char_traits<_CharT> >
 
  226        template<
class _Allocator>
 
  229            : __data (__str.data()), __size(__str.size()) {}
 
  233            : __data(__s), __size(__len)
 
  240            : __data(__s), __size(_Traits::length(__s)) {}
 
  287            return __pos >= size()
 
  288                ? (
throw out_of_range(
"string_view::at"), __data[0])
 
  295            return _LIBCPP_ASSERT(!empty(), 
"string_view::front(): string is empty"), __data[0];
 
  301            return _LIBCPP_ASSERT(!empty(), 
"string_view::back(): string is empty"), __data[__size-1];
 
  318            _LIBCPP_ASSERT(__n <= size(), 
"remove_prefix() can't remove more than size()");
 
  326            _LIBCPP_ASSERT(__n <= size(), 
"remove_suffix() can't remove more than size()");
 
  334            __data = __other.__data;
 
  335            __other.__data = __p;
 
  338            __size = __other.__size;
 
  339            __other.__size = __sz;
 
  345        template<
class _Allocator>
 
  348        { 
return basic_string<_CharT, _Traits, _Allocator>( begin(), end()); }
 
  353                throw out_of_range(
"string_view::copy");
 
  354            size_type __rlen = (_VSTD::min)( __n, size() - __pos );
 
  355            _VSTD::copy_n(begin() + __pos, __rlen, __s );
 
  366            return __pos > size()
 
  367                ? 
throw out_of_range(
"string_view::substr")
 
  373            size_type __rlen = (_VSTD::min)( size(), __sv.size());
 
  374            int __retval = _Traits::compare(
data(), __sv.data(), __rlen);
 
  376                __retval = size() == __sv.size() ? 0 : ( size() < __sv.size() ? -1 : 1 );
 
  383            return substr(__pos1, __n1).compare(__sv);
 
  390            return substr(__pos1, __n1).compare(_sv.
substr(__pos2, __n2));
 
  416            return _VSTD::__str_find<value_type, size_type, traits_type, npos>
 
  423            return _VSTD::__str_find<value_type, size_type, traits_type, npos>
 
  424                (
data(), size(), __c, __pos);
 
  430            _LIBCPP_ASSERT(__n == 0 || __s != 
nullptr, 
"string_view::find(): recieved nullptr");
 
  431            return _VSTD::__str_find<value_type, size_type, traits_type, npos>
 
  432                (
data(), size(), __s, __pos, __n);
 
  438            _LIBCPP_ASSERT(__s != 
nullptr, 
"string_view::find(): recieved nullptr");
 
  439            return _VSTD::__str_find<value_type, size_type, traits_type, npos>
 
  440                (
data(), size(), __s, __pos, traits_type::length(__s));
 
  447            _LIBCPP_ASSERT(__s.size() == 0 || __s.data() != 
nullptr, 
"string_view::find(): recieved nullptr");
 
  448            return _VSTD::__str_rfind<value_type, size_type, traits_type, npos>
 
  449                (
data(), size(), __s.data(), __pos, __s.size());
 
  455            return _VSTD::__str_rfind<value_type, size_type, traits_type, npos>
 
  456                (
data(), size(), __c, __pos);
 
  462            _LIBCPP_ASSERT(__n == 0 || __s != 
nullptr, 
"string_view::rfind(): recieved nullptr");
 
  463            return _VSTD::__str_rfind<value_type, size_type, traits_type, npos>
 
  464                (
data(), size(), __s, __pos, __n);
 
  470            _LIBCPP_ASSERT(__s != 
nullptr, 
"string_view::rfind(): recieved nullptr");
 
  471            return _VSTD::__str_rfind<value_type, size_type, traits_type, npos>
 
  472                (
data(), size(), __s, __pos, traits_type::length(__s));
 
  479            _LIBCPP_ASSERT(__s.
size() == 0 || __s.
data() != 
nullptr, 
"string_view::find_first_of(): recieved nullptr");
 
  480            return _VSTD::__str_find_first_of<value_type, size_type, traits_type, npos>
 
  486        { 
return find(__c, __pos); }
 
  491            _LIBCPP_ASSERT(__n == 0 || __s != 
nullptr, 
"string_view::find_first_of(): recieved nullptr");
 
  492            return _VSTD::__str_find_first_of<value_type, size_type, traits_type, npos>
 
  493                (
data(), size(), __s, __pos, __n);
 
  499            _LIBCPP_ASSERT(__s != 
nullptr, 
"string_view::find_first_of(): recieved nullptr");
 
  500            return _VSTD::__str_find_first_of<value_type, size_type, traits_type, npos>
 
  501                (
data(), size(), __s, __pos, traits_type::length(__s));
 
  508            _LIBCPP_ASSERT(__s.size() == 0 || __s.data() != 
nullptr, 
"string_view::find_last_of(): recieved nullptr");
 
  509            return _VSTD::__str_find_last_of<value_type, size_type, traits_type, npos>
 
  510                (
data(), size(), __s.data(), __pos, __s.size());
 
  515        { 
return rfind(__c, __pos); }
 
  520            _LIBCPP_ASSERT(__n == 0 || __s != 
nullptr, 
"string_view::find_last_of(): recieved nullptr");
 
  521            return _VSTD::__str_find_last_of<value_type, size_type, traits_type, npos>
 
  522                (
data(), size(), __s, __pos, __n);
 
  528            _LIBCPP_ASSERT(__s != 
nullptr, 
"string_view::find_last_of(): recieved nullptr");
 
  529            return _VSTD::__str_find_last_of<value_type, size_type, traits_type, npos>
 
  530                (
data(), size(), __s, __pos, traits_type::length(__s));
 
  537            _LIBCPP_ASSERT(__s.
size() == 0 || __s.
data() != 
nullptr, 
"string_view::find_first_not_of(): recieved nullptr");
 
  538            return _VSTD::__str_find_first_not_of<value_type, size_type, traits_type, npos>
 
  545            return _VSTD::__str_find_first_not_of<value_type, size_type, traits_type, npos>
 
  546                (
data(), size(), __c, __pos);
 
  552            _LIBCPP_ASSERT(__n == 0 || __s != 
nullptr, 
"string_view::find_first_not_of(): recieved nullptr");
 
  553            return _VSTD::__str_find_first_not_of<value_type, size_type, traits_type, npos>
 
  554                (
data(), size(), __s, __pos, __n);
 
  560            _LIBCPP_ASSERT(__s != 
nullptr, 
"string_view::find_first_not_of(): recieved nullptr");
 
  561            return _VSTD::__str_find_first_not_of<value_type, size_type, traits_type, npos>
 
  562                (
data(), size(), __s, __pos, traits_type::length(__s));
 
  569            _LIBCPP_ASSERT(__s.size() == 0 || __s.data() != 
nullptr, 
"string_view::find_last_not_of(): recieved nullptr");
 
  570            return _VSTD::__str_find_last_not_of<value_type, size_type, traits_type, npos>
 
  571                (
data(), size(), __s.data(), __pos, __s.size());
 
  577            return _VSTD::__str_find_last_not_of<value_type, size_type, traits_type, npos>
 
  578                (
data(), size(), __c, __pos);
 
  584            _LIBCPP_ASSERT(__n == 0 || __s != 
nullptr, 
"string_view::find_last_not_of(): recieved nullptr");
 
  585            return _VSTD::__str_find_last_not_of<value_type, size_type, traits_type, npos>
 
  586                (
data(), size(), __s, __pos, __n);
 
  592            _LIBCPP_ASSERT(__s != 
nullptr, 
"string_view::find_last_not_of(): recieved nullptr");
 
  593            return _VSTD::__str_find_last_not_of<value_type, size_type, traits_type, npos>
 
  594                (
data(), size(), __s, __pos, traits_type::length(__s));
 
  605    template<
class _CharT, 
class _Traits>
 
  610        if ( __lhs.size() != __rhs.size()) 
return false;
 
  611        return __lhs.compare(__rhs) == 0;
 
  614    template<
class _CharT, 
class _Traits>
 
  619        if ( __lhs.size() != __rhs.size()) 
return false;
 
  620        return __lhs.compare(__rhs) == 0;
 
  623    template<
class _CharT, 
class _Traits>
 
  628        if ( __lhs.size() != __rhs.size()) 
return false;
 
  629        return __lhs.compare(__rhs) == 0;
 
  633    template<
class _CharT, 
class _Traits>
 
  639        if ( __lhs.size() != __rhsv.size()) 
return false;
 
  640        return __lhs.compare(__rhsv) == 0;
 
  646    template<
class _CharT, 
class _Traits>
 
  650        if ( __lhs.size() != __rhs.size())
 
  652        return __lhs.compare(__rhs) != 0;
 
  655    template<
class _CharT, 
class _Traits>
 
  660        if ( __lhs.size() != __rhs.size())
 
  662        return __lhs.compare(__rhs) != 0;
 
  665    template<
class _CharT, 
class _Traits>
 
  670        if ( __lhs.size() != __rhs.size())
 
  672        return __lhs.compare(__rhs) != 0;
 
  677    template<
class _CharT, 
class _Traits>
 
  681        return __lhs.compare(__rhs) < 0;
 
  684    template<
class _CharT, 
class _Traits>
 
  689        return __lhs.compare(__rhs) < 0;
 
  692    template<
class _CharT, 
class _Traits>
 
  697        return __lhs.compare(__rhs) < 0;
 
  702    template<
class _CharT, 
class _Traits>
 
  706        return __lhs.compare(__rhs) > 0;
 
  709    template<
class _CharT, 
class _Traits>
 
  714        return __lhs.compare(__rhs) > 0;
 
  717    template<
class _CharT, 
class _Traits>
 
  722        return __lhs.compare(__rhs) > 0;
 
  727    template<
class _CharT, 
class _Traits>
 
  731        return __lhs.compare(__rhs) <= 0;
 
  734    template<
class _CharT, 
class _Traits>
 
  739        return __lhs.compare(__rhs) <= 0;
 
  742    template<
class _CharT, 
class _Traits>
 
  747        return __lhs.compare(__rhs) <= 0;
 
  752    template<
class _CharT, 
class _Traits>
 
  756        return __lhs.compare(__rhs) >= 0;
 
  760    template<
class _CharT, 
class _Traits>
 
  765        return __lhs.compare(__rhs) >= 0;
 
  768    template<
class _CharT, 
class _Traits>
 
  773        return __lhs.compare(__rhs) >= 0;
 
  778    template<
class _CharT, 
class _Traits>
 
  779    basic_ostream<_CharT, _Traits>&
 
  795template<
class _CharT, 
class _Traits>
 
  797    : 
public unary_function<std::experimental::basic_string_view<_CharT, _Traits>, size_t>
 
  799    size_t operator()(
const std::experimental::basic_string_view<_CharT, _Traits>& __val) 
const _NOEXCEPT;
 
  802template<
class _CharT, 
class _Traits>
 
  804hash<std::experimental::basic_string_view<_CharT, _Traits> >::operator()(
 
  805        const std::experimental::basic_string_view<_CharT, _Traits>& __val) 
const _NOEXCEPT 
  807    return __do_string_hash(__val.data(), __val.data() + __val.size());
 
  810#if _LIBCPP_STD_VER > 11 
  811template <
class _CharT, 
class _Traits>
 
  812__quoted_output_proxy<_CharT, const _CharT *, _Traits>
 
  813quoted ( std::experimental::basic_string_view <_CharT, _Traits> __sv,
 
  814             _CharT __delim = _CharT(
'"'), _CharT __escape=_CharT(
'\\'))
 
  816    return __quoted_output_proxy<_CharT, const _CharT *, _Traits>
 
  817         ( __sv.data(), __sv.data() + __sv.size(), __delim, __escape );
 
#define _LIBCPP_END_NAMESPACE_STD
#define _LIBCPP_INLINE_VISIBILITY
#define _ROOT_LIBCPP_END_NAMESPACE_LFTS
#define _LIBCPP_CONSTEXPR_AFTER_CXX11
#define _LIBCPP_TYPE_VIS_ONLY
#define _LIBCPP_CONSTEXPR
#define _ROOT_LIBCPP_BEGIN_NAMESPACE_LFTS
#define _LIBCPP_ASSERT(X, Y)
#define _LIBCPP_BEGIN_NAMESPACE_STD
TRObject operator()(const T1 &t1) const
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY size_type find_first_of(const _CharT *__s, size_type __pos=0) const
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY size_type find(basic_string_view __s, size_type __pos=0) const _NOEXCEPT
const _CharT & const_reference
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY basic_string_view(const _CharT *__s)
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY const_iterator end() const _NOEXCEPT
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY basic_string_view(const basic_string_view &) _NOEXCEPT=default
ptrdiff_t difference_type
_LIBCPP_CONSTEXPR_AFTER_CXX11 int compare(basic_string_view __sv) const _NOEXCEPT
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY void clear() _NOEXCEPT
_LIBCPP_CONSTEXPR bool _LIBCPP_INLINE_VISIBILITY empty() const _NOEXCEPT
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY basic_string_view(const _CharT *__s, size_type __len)
_LIBCPP_INLINE_VISIBILITY basic_string_view(const basic_string< _CharT, _Traits, _Allocator > &__str) _NOEXCEPT
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY size_type length() const _NOEXCEPT
_LIBCPP_INLINE_VISIBILITY const_reverse_iterator rbegin() const _NOEXCEPT
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY size_type size() const _NOEXCEPT
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY int compare(size_type __pos1, size_type __n1, const _CharT *__s, size_type __n2) const
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY const_iterator begin() const _NOEXCEPT
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY size_type find_last_of(basic_string_view __s, size_type __pos=npos) const _NOEXCEPT
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY void swap(basic_string_view &__other) _NOEXCEPT
_LIBCPP_INLINE_VISIBILITY const_reverse_iterator crbegin() const _NOEXCEPT
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY basic_string_view() _NOEXCEPT
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY size_type find(_CharT __c, size_type __pos=0) const _NOEXCEPT
_LIBCPP_INLINE_VISIBILITY const_reverse_iterator rend() const _NOEXCEPT
const_pointer const_iterator
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY size_type find_last_of(_CharT __c, size_type __pos=npos) const _NOEXCEPT
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY size_type find(const _CharT *__s, size_type __pos=0) const
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY size_type find_last_not_of(basic_string_view __s, size_type __pos=npos) const _NOEXCEPT
const_reverse_iterator reverse_iterator
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY size_type find_last_of(const _CharT *__s, size_type __pos=npos) const
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY const_pointer data() const _NOEXCEPT
_VSTD::reverse_iterator< const_iterator > const_reverse_iterator
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY size_type rfind(const _CharT *__s, size_type __pos=npos) const
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY size_type find_last_not_of(_CharT __c, size_type __pos=npos) const _NOEXCEPT
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY size_type find(const _CharT *__s, size_type __pos, size_type __n) const
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY size_type rfind(basic_string_view __s, size_type __pos=npos) const _NOEXCEPT
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY size_type rfind(_CharT __c, size_type __pos=npos) const _NOEXCEPT
size_type copy(_CharT *__s, size_type __n, size_type __pos=0) const
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY const_reference operator[](size_type __pos) const
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY size_type find_first_not_of(const _CharT *__s, size_type __pos=0) const
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY size_type max_size() const _NOEXCEPT
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY int compare(size_type __pos1, size_type __n1, const _CharT *__s) const
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY const_iterator cend() const _NOEXCEPT
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY const_iterator cbegin() const _NOEXCEPT
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY size_type find_last_of(const _CharT *__s, size_type __pos, size_type __n) const
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY size_type find_last_not_of(const _CharT *__s, size_type __pos, size_type __n) const
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY size_type find_last_not_of(const _CharT *__s, size_type __pos=npos) const
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY size_type rfind(const _CharT *__s, size_type __pos, size_type __n) const
_LIBCPP_CONSTEXPR basic_string_view substr(size_type __pos=0, size_type __n=npos) const
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY size_type find_first_not_of(const _CharT *__s, size_type __pos, size_type __n) const
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY const_reference back() const
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY size_type find_first_of(basic_string_view __s, size_type __pos=0) const _NOEXCEPT
_LIBCPP_INLINE_VISIBILITY const_reverse_iterator crend() const _NOEXCEPT
_LIBCPP_INLINE_VISIBILITY basic_string_view & operator=(const basic_string_view &) _NOEXCEPT=default
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY void remove_prefix(size_type __n) _NOEXCEPT
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY size_type find_first_not_of(basic_string_view __s, size_type __pos=0) const _NOEXCEPT
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY int compare(const _CharT *__s) const
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY size_type find_first_of(_CharT __c, size_type __pos=0) const _NOEXCEPT
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY int compare(size_type __pos1, size_type __n1, basic_string_view __sv) const
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY size_type find_first_not_of(_CharT __c, size_type __pos=0) const _NOEXCEPT
const _CharT * const_pointer
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY const_reference at(size_type __pos) const
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY int compare(size_type __pos1, size_type __n1, basic_string_view _sv, size_type __pos2, size_type __n2) const
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY const_reference front() const
const value_type * __data
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY size_type find_first_of(const _CharT *__s, size_type __pos, size_type __n) const
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY void remove_suffix(size_type __n) _NOEXCEPT
basic_string_view< char32_t > u32string_view
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY bool operator>=(basic_string_view< _CharT, _Traits > __lhs, basic_string_view< _CharT, _Traits > __rhs) _NOEXCEPT
basic_string_view< char > string_view
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY bool operator!=(basic_string_view< _CharT, _Traits > __lhs, basic_string_view< _CharT, _Traits > __rhs) _NOEXCEPT
basic_ostream< _CharT, _Traits > & operator<<(basic_ostream< _CharT, _Traits > &__os, basic_string_view< _CharT, _Traits > __sv)
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY bool operator==(basic_string_view< _CharT, _Traits > __lhs, basic_string_view< _CharT, _Traits > __rhs) _NOEXCEPT
basic_string_view< char16_t > u16string_view
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY bool operator<(basic_string_view< _CharT, _Traits > __lhs, basic_string_view< _CharT, _Traits > __rhs) _NOEXCEPT
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY bool operator>(basic_string_view< _CharT, _Traits > __lhs, basic_string_view< _CharT, _Traits > __rhs) _NOEXCEPT
basic_string_view< wchar_t > wstring_view
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY bool operator<=(basic_string_view< _CharT, _Traits > __lhs, basic_string_view< _CharT, _Traits > __rhs) _NOEXCEPT
basic_ostream< _CharT, _Traits > & R__put_character_sequence(basic_ostream< _CharT, _Traits > &__os, const _CharT *__str, size_t __len)
::std::experimental::basic_string_view< _CharT, _Traits > basic_string_view