16#ifndef _STLP_STRING_OPERATORS_H
17#define _STLP_STRING_OPERATORS_H
21#if !defined (_STLP_USE_TEMPLATE_EXPRESSION)
23# if defined (__GNUC__) || defined (__MLCCPP__)
24# define _STLP_INIT_AMBIGUITY 1
27template <
class _CharT,
class _Traits,
class _Alloc>
32 typedef typename _Str::_Reserve_t _Reserve_t;
33# if defined (_STLP_INIT_AMBIGUITY)
44template <
class _CharT,
class _Traits,
class _Alloc>
50 typedef typename _Str::_Reserve_t _Reserve_t;
51 const size_t __n = _Traits::length(__s);
52# if defined (_STLP_INIT_AMBIGUITY)
57 __result.append(__s, __s +
__n);
62template <
class _CharT,
class _Traits,
class _Alloc>
67 typedef typename _Str::_Reserve_t _Reserve_t;
68# if defined (_STLP_INIT_AMBIGUITY)
73 __result.push_back(
__c);
78template <
class _CharT,
class _Traits,
class _Alloc>
84 typedef typename _Str::_Reserve_t _Reserve_t;
85 const size_t __n = _Traits::length(__s);
86# if defined (_STLP_INIT_AMBIGUITY)
92 __result.append(__s, __s +
__n);
96template <
class _CharT,
class _Traits,
class _Alloc>
101 typedef typename _Str::_Reserve_t _Reserve_t;
102# if defined (_STLP_INIT_AMBIGUITY)
107 __result.append(__x);
108 __result.push_back(
__c);
112# undef _STLP_INIT_AMBIGUITY
117template <
class _CharT,
class _Traits,
class _Alloc>
136template <
class _CharT,
class _Traits,
class _Alloc,
class _Left,
class _Right,
class _StorageDir>
148template <
class _CharT,
class _Traits,
class _Alloc,
class _Left,
class _Right,
class _StorageDir>
161template <
class _CharT,
class _Traits,
class _Alloc>
171 const size_t __n = _Traits::length(__s);
180template <
class _CharT,
class _Traits,
class _Alloc>
190 const size_t __n = _Traits::length(__s);
200template <
class _CharT,
class _Traits,
class _Alloc,
class _Left,
class _Right,
class _StorageDir>
207 const size_t __n = _Traits::length(__s);
213template <
class _CharT,
class _Traits,
class _Alloc,
class _Left,
class _Right,
class _StorageDir>
220 const size_t __n = _Traits::length(__s);
227template <
class _CharT,
class _Traits,
class _Alloc>
244template <
class _CharT,
class _Traits,
class _Alloc>
261template <
class _CharT,
class _Traits,
class _Alloc,
class _Left,
class _Right,
class _StorageDir>
271template <
class _CharT,
class _Traits,
class _Alloc,
class _Left,
class _Right,
class _StorageDir>
285template <
class _CharT,
class _Traits,
class _Alloc>
292#if defined (_STLP_USE_TEMPLATE_EXPRESSION)
293template <
class _CharT,
class _Traits,
class _Alloc,
class _Lhs,
class _Rhs,
class _StoreDir>
297 return __x.size() == __y.
size() && _Traits::compare(__x.data(), __y.
data(), __x.size()) == 0;
300template <
class _CharT,
class _Traits,
class _Alloc,
class _Lhs,
class _Rhs,
class _StoreDir>
304 return __x.
size() == __y.size() && _Traits::compare(__x.
data(), __y.data(), __x.
size()) == 0;
309template <
class _CharT,
class _Traits,
class _Alloc>
314 size_t __n = _Traits::length(__s);
315 return __n == __y.
size() && _Traits::compare(__s, __y.
data(),
__n) == 0;
318template <
class _CharT,
class _Traits,
class _Alloc>
323 size_t __n = _Traits::length(__s);
324 return __x.
size() ==
__n && _Traits::compare(__x.
data(), __s,
__n) == 0;
327#if defined (_STLP_USE_TEMPLATE_EXPRESSION)
328template <
class _CharT,
class _Traits,
class _Alloc,
class _Lhs,
class _Rhs,
class _StoreDir>
333 size_t __n = _Traits::length(__s);
334 return __n == __y.size() && _Traits::compare(__s, __y.data(),
__n) == 0;
337template <
class _CharT,
class _Traits,
class _Alloc,
class _Lhs,
class _Rhs,
class _StoreDir>
342 size_t __n = _Traits::length(__s);
343 return __x.size() ==
__n && _Traits::compare(__x.data(), __s,
__n) == 0;
349template <
class _CharT,
class _Traits,
class _Alloc>
357#if defined (_STLP_USE_TEMPLATE_EXPRESSION)
358template <
class _CharT,
class _Traits,
class _Alloc,
class _Lhs,
class _Rhs,
class _StoreDir>
366template <
class _CharT,
class _Traits,
class _Alloc,
class _Lhs,
class _Rhs,
class _StoreDir>
371 __y.begin(), __y.end()) < 0;
375template <
class _CharT,
class _Traits,
class _Alloc>
380 size_t __n = _Traits::length(__s);
385template <
class _CharT,
class _Traits,
class _Alloc>
390 size_t __n = _Traits::length(__s);
395#if defined (_STLP_USE_TEMPLATE_EXPRESSION)
396template <
class _CharT,
class _Traits,
class _Alloc,
class _Lhs,
class _Rhs,
class _StoreDir>
401 size_t __n = _Traits::length(__s);
403 __y.begin(), __y.end()) < 0;
406template <
class _CharT,
class _Traits,
class _Alloc,
class _Lhs,
class _Rhs,
class _StoreDir>
411 size_t __n = _Traits::length(__s);
417#if defined (_STLP_USE_SEPARATE_RELOPS_NAMESPACE)
423template <
class _CharT,
class _Traits,
class _Alloc>
427{
return !(__x == __y); }
429template <
class _CharT,
class _Traits,
class _Alloc>
435template <
class _CharT,
class _Traits,
class _Alloc>
439{
return !(__y < __x); }
441template <
class _CharT,
class _Traits,
class _Alloc>
445{
return !(__x < __y); }
447# if defined (_STLP_USE_TEMPLATE_EXPRESSION)
448template <
class _CharT,
class _Traits,
class _Alloc,
class _Lhs,
class _Rhs,
class _StoreDir>
452{
return !(__x==__y); }
454template <
class _CharT,
class _Traits,
class _Alloc,
class _Lhs,
class _Rhs,
class _StoreDir>
458{
return !(__x==__y); }
463template <
class _CharT,
class _Traits,
class _Alloc>
468 return !(__s == __y);
471template <
class _CharT,
class _Traits,
class _Alloc>
476 return !(__x == __s);
479#if defined (_STLP_USE_TEMPLATE_EXPRESSION)
480template <
class _CharT,
class _Traits,
class _Alloc,
class _Lhs,
class _Rhs,
class _StoreDir>
485 return !(__s == __y);
488template <
class _CharT,
class _Traits,
class _Alloc,
class _Lhs,
class _Rhs,
class _StoreDir>
493 return !(__x == __s);
497template <
class _CharT,
class _Traits,
class _Alloc>
505template <
class _CharT,
class _Traits,
class _Alloc>
513#if defined (_STLP_USE_TEMPLATE_EXPRESSION)
514template <
class _CharT,
class _Traits,
class _Alloc,
class _Lhs,
class _Rhs,
class _StoreDir>
522template <
class _CharT,
class _Traits,
class _Alloc,
class _Lhs,
class _Rhs,
class _StoreDir>
531template <
class _CharT,
class _Traits,
class _Alloc>
539template <
class _CharT,
class _Traits,
class _Alloc>
547#if defined (_STLP_USE_TEMPLATE_EXPRESSION)
548template <
class _CharT,
class _Traits,
class _Alloc,
class _Lhs,
class _Rhs,
class _StoreDir>
556template <
class _CharT,
class _Traits,
class _Alloc,
class _Lhs,
class _Rhs,
class _StoreDir>
565template <
class _CharT,
class _Traits,
class _Alloc>
573template <
class _CharT,
class _Traits,
class _Alloc>
581#if defined (_STLP_USE_TEMPLATE_EXPRESSION)
582template <
class _CharT,
class _Traits,
class _Alloc,
class _Lhs,
class _Rhs,
class _StoreDir>
590template <
class _CharT,
class _Traits,
class _Alloc,
class _Lhs,
class _Rhs,
class _StoreDir>
_STLP_BEGIN_NAMESPACE basic_string< _CharT, _Traits, _Alloc > _STLP_CALL operator+(const basic_string< _CharT, _Traits, _Alloc > &__s, const basic_string< _CharT, _Traits, _Alloc > &__y)
bool _STLP_CALL operator>(const _CharT *__s, const basic_string< _CharT, _Traits, _Alloc > &__y)
bool _STLP_CALL operator!=(const _CharT *__s, const basic_string< _CharT, _Traits, _Alloc > &__y)
bool _STLP_CALL operator<(const basic_string< _CharT, _Traits, _Alloc > &__x, const basic_string< _CharT, _Traits, _Alloc > &__y)
bool _STLP_CALL operator==(const basic_string< _CharT, _Traits, _Alloc > &__x, const basic_string< _CharT, _Traits, _Alloc > &__y)
bool _STLP_CALL operator>=(const _CharT *__s, const basic_string< _CharT, _Traits, _Alloc > &__y)
bool _STLP_CALL operator<=(const _CharT *__s, const basic_string< _CharT, _Traits, _Alloc > &__y)
allocator_type get_allocator() const
const _CharT * data() const
#define _STLP_FIX_LITERAL_BUG(__x)
#define _STLP_BEGIN_NAMESPACE
#define _STLP_END_NAMESPACE