19720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* 29720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * Copyright (c) 2003 39720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * Francois Dumont 49720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * 59720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * This material is provided "as is", with absolutely no warranty expressed 69720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * or implied. Any use is at your own risk. 79720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * 89720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * Permission to use or copy this software for any purpose is hereby granted 99720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * without fee, provided the above notices are retained on all copies. 109720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * Permission to modify the code and to distribute modified code is granted, 119720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * provided the above notices are retained, and a notice that the code was 129720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * modified is included with the above copyright notice. 139720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * 149720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block */ 159720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 169720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#ifndef _STLP_STRING_OPERATORS_H 179720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#define _STLP_STRING_OPERATORS_H 189720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 199720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block_STLP_BEGIN_NAMESPACE 209720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 219720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if !defined (_STLP_USE_TEMPLATE_EXPRESSION) 229720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 239720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# if defined (__GNUC__) || defined (__MLCCPP__) 249720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# define _STLP_INIT_AMBIGUITY 1 259720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# endif 269720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 279720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc> 289720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline basic_string<_CharT,_Traits,_Alloc> _STLP_CALL 299720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator+(const basic_string<_CharT,_Traits,_Alloc>& __s, 309720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const basic_string<_CharT,_Traits,_Alloc>& __y) { 319720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef basic_string<_CharT,_Traits,_Alloc> _Str; 329720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Str::_Reserve_t _Reserve_t; 339720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# if defined (_STLP_INIT_AMBIGUITY) 349720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block // gcc counts this as a function 359720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _Str __result = _Str(_Reserve_t(), __s.size() + __y.size(), __s.get_allocator()); 369720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# else 379720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _Str __result(_Reserve_t(), __s.size() + __y.size(), __s.get_allocator()); 389720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# endif 399720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block __result.append(__s); 409720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block __result.append(__y); 419720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return __result; 429720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 439720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 449720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc> 459720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline basic_string<_CharT,_Traits,_Alloc> _STLP_CALL 469720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator+(const _CharT* __s, 479720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const basic_string<_CharT,_Traits,_Alloc>& __y) { 489720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_FIX_LITERAL_BUG(__s) 499720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef basic_string<_CharT,_Traits,_Alloc> _Str; 509720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Str::_Reserve_t _Reserve_t; 519720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const size_t __n = _Traits::length(__s); 529720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# if defined (_STLP_INIT_AMBIGUITY) 539720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _Str __result = _Str(_Reserve_t(), __n + __y.size(), __y.get_allocator()); 549720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# else 559720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _Str __result(_Reserve_t(), __n + __y.size(), __y.get_allocator()); 569720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# endif 579720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block __result.append(__s, __s + __n); 589720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block __result.append(__y); 599720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return __result; 609720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 619720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 629720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc> 639720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline basic_string<_CharT,_Traits,_Alloc> _STLP_CALL 649720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator+(_CharT __c, 659720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const basic_string<_CharT,_Traits,_Alloc>& __y) { 669720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef basic_string<_CharT,_Traits,_Alloc> _Str; 679720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Str::_Reserve_t _Reserve_t; 689720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# if defined (_STLP_INIT_AMBIGUITY) 699720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _Str __result = _Str(_Reserve_t(), 1 + __y.size(), __y.get_allocator()); 709720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# else 719720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _Str __result(_Reserve_t(), 1 + __y.size(), __y.get_allocator()); 729720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# endif 739720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block __result.push_back(__c); 749720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block __result.append(__y); 759720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return __result; 769720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 779720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 789720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc> 799720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline basic_string<_CharT,_Traits,_Alloc> _STLP_CALL 809720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator+(const basic_string<_CharT,_Traits,_Alloc>& __x, 819720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const _CharT* __s) { 829720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_FIX_LITERAL_BUG(__s) 839720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef basic_string<_CharT,_Traits,_Alloc> _Str; 849720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Str::_Reserve_t _Reserve_t; 859720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const size_t __n = _Traits::length(__s); 869720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# if defined (_STLP_INIT_AMBIGUITY) 879720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _Str __result = _Str(_Reserve_t(), __x.size() + __n, __x.get_allocator()); 889720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# else 899720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _Str __result(_Reserve_t(), __x.size() + __n, __x.get_allocator()); 909720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# endif 919720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block __result.append(__x); 929720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block __result.append(__s, __s + __n); 939720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return __result; 949720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 959720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 969720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc> 979720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline basic_string<_CharT,_Traits,_Alloc> _STLP_CALL 989720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator+(const basic_string<_CharT,_Traits,_Alloc>& __x, 999720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const _CharT __c) { 1009720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef basic_string<_CharT,_Traits,_Alloc> _Str; 1019720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef typename _Str::_Reserve_t _Reserve_t; 1029720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# if defined (_STLP_INIT_AMBIGUITY) 1039720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _Str __result = _Str(_Reserve_t(), __x.size() + 1, __x.get_allocator()); 1049720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# else 1059720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _Str __result(_Reserve_t(), __x.size() + 1, __x.get_allocator()); 1069720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# endif 1079720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block __result.append(__x); 1089720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block __result.push_back(__c); 1099720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return __result; 1109720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 1119720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 1129720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# undef _STLP_INIT_AMBIGUITY 1139720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 1149720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#else /* _STLP_USE_TEMPLATE_EXPRESSION */ 1159720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 1169720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block// addition with basic_string 1179720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc> 1189720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, 1199720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, 1209720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, 1219720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, 1229720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>, 1239720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __on_right>, 1249720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __on_right> _STLP_CALL 1259720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator+(const basic_string<_CharT,_Traits,_Alloc>& __lhs, 1269720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const basic_string<_CharT,_Traits,_Alloc>& __rhs) { 1279720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, 1289720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>, 1299720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __on_right> __root_type; 1309720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block __root_type __root(__rhs, _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>(__lhs.get_allocator())); 1319720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, 1329720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block __root_type, 1339720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __on_right>(__lhs, __root); 1349720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 1359720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 1369720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc, class _Left, class _Right, class _StorageDir> 1379720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, 1389720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, 1399720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, 1409720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __on_right> _STLP_CALL 1419720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator+(const basic_string<_CharT,_Traits,_Alloc>& __lhs, 1429720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>& __rhs) { 1439720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, 1449720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, 1459720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __on_right>(__lhs, __rhs); 1469720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 1479720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 1489720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc, class _Left, class _Right, class _StorageDir> 1499720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, 1509720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, 1519720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, 1529720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __on_left> _STLP_CALL 1539720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator+(const _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>& __lhs, 1549720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const basic_string<_CharT,_Traits,_Alloc>& __rhs) { 1559720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, 1569720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, 1579720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __on_left>(__lhs, __rhs); 1589720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 1599720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 1609720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block// addition with C string 1619720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc> 1629720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, 1639720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, 1649720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, 1659720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __cstr_wrapper<_CharT>, 1669720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>, 1679720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __on_right>, 1689720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __on_right> _STLP_CALL 1699720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator+(const basic_string<_CharT,_Traits,_Alloc>& __x, 1709720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const _CharT* __s) { 1719720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const size_t __n = _Traits::length(__s); 1729720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __cstr_wrapper<_CharT>, 1739720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>, 1749720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __on_right> __root_type; 1759720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block __root_type __root(_STLP_PRIV __cstr_wrapper<_CharT>(__s, __n), _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>(__x.get_allocator())); 1769720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, 1779720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block __root_type, _STLP_PRIV __on_right>(__x, __root); 1789720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 1799720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 1809720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc> 1819720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, 1829720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __cstr_wrapper<_CharT>, 1839720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, 1849720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, 1859720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>, 1869720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __on_right>, 1879720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __on_right> _STLP_CALL 1889720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator+(const _CharT* __s, 1899720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const basic_string<_CharT,_Traits,_Alloc>& __y) { 1909720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const size_t __n = _Traits::length(__s); 1919720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, 1929720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>, 1939720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __on_right> __root_type; 1949720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block __root_type __root(__y, _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>(__y.get_allocator())); 1959720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __cstr_wrapper<_CharT>, 1969720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block __root_type, 1979720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __on_right>(_STLP_PRIV __cstr_wrapper<_CharT>(__s, __n), __root); 1989720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 1999720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2009720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc, class _Left, class _Right, class _StorageDir> 2019720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, 2029720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, 2039720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __cstr_wrapper<_CharT>, 2049720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __on_left> _STLP_CALL 2059720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator+(const _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>& __x, 2069720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const _CharT* __s) { 2079720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const size_t __n = _Traits::length(__s); 2089720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, 2099720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __cstr_wrapper<_CharT>, 2109720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __on_left>(__x, _STLP_PRIV __cstr_wrapper<_CharT>(__s, __n)); 2119720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 2129720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2139720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc, class _Left, class _Right, class _StorageDir> 2149720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, 2159720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __cstr_wrapper<_CharT>, 2169720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, 2179720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __on_right> _STLP_CALL 2189720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator+(const _CharT* __s, 2199720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>& __y) { 2209720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const size_t __n = _Traits::length(__s); 2219720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __cstr_wrapper<_CharT>, 2229720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, 2239720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __on_right>(_STLP_PRIV __cstr_wrapper<_CharT>(__s, __n), __y); 2249720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 2259720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2269720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block// addition with char 2279720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc> 2289720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, 2299720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, 2309720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, 2319720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __char_wrapper<_CharT>, 2329720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>, 2339720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __on_right>, 2349720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __on_right> _STLP_CALL 2359720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator+(const basic_string<_CharT,_Traits,_Alloc>& __x, const _CharT __c) { 2369720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __char_wrapper<_CharT>, 2379720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>, 2389720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __on_right> __root_type; 2399720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block __root_type __root(__c, _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>(__x.get_allocator())); 2409720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, 2419720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block __root_type, _STLP_PRIV __on_right>(__x, __root); 2429720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 2439720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2449720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc> 2459720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, 2469720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __char_wrapper<_CharT>, 2479720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, 2489720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, 2499720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>, 2509720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __on_right>, 2519720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __on_right> _STLP_CALL 2529720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator+(const _CharT __c, const basic_string<_CharT,_Traits,_Alloc>& __x) { 2539720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block typedef _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, 2549720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>, 2559720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __on_right> __root_type; 2569720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block __root_type __root(__x, _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>(__x.get_allocator())); 2579720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __char_wrapper<_CharT>, 2589720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block __root_type, _STLP_PRIV __on_right>(__c, __root); 2599720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 2609720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2619720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc, class _Left, class _Right, class _StorageDir> 2629720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, 2639720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, 2649720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __char_wrapper<_CharT>, 2659720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __on_left> _STLP_CALL 2669720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator+(const _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>& __x, const _CharT __c) { 2679720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, 2689720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __char_wrapper<_CharT>, _STLP_PRIV __on_left>(__x, __c); 2699720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 2709720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2719720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc, class _Left, class _Right, class _StorageDir> 2729720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __char_wrapper<_CharT>, 2739720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, 2749720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __on_right> _STLP_CALL 2759720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator+(const _CharT __c, const _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>& __x) { 2769720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __char_wrapper<_CharT>, 2779720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, 2789720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_PRIV __on_right>(__c, __x); 2799720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 2809720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2819720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* _STLP_USE_TEMPLATE_EXPRESSION */ 2829720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2839720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block// Operator== and operator!= 2849720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2859720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc> 2869720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 2879720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator==(const basic_string<_CharT,_Traits,_Alloc>& __x, 2889720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const basic_string<_CharT,_Traits,_Alloc>& __y) { 2899720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return __x.size() == __y.size() && _Traits::compare(__x.data(), __y.data(), __x.size()) == 0; 2909720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 2919720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 2929720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_USE_TEMPLATE_EXPRESSION) 2939720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir> 2949720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 2959720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator==(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x, 2969720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const basic_string<_CharT,_Traits,_Alloc>& __y) { 2979720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return __x.size() == __y.size() && _Traits::compare(__x.data(), __y.data(), __x.size()) == 0; 2989720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 2999720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 3009720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir> 3019720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 3029720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator==(const basic_string<_CharT,_Traits,_Alloc>& __x, 3039720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y) { 3049720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return __x.size() == __y.size() && _Traits::compare(__x.data(), __y.data(), __x.size()) == 0; 3059720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 3069720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* _STLP_USE_TEMPLATE_EXPRESSION */ 3079720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 3089720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 3099720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc> 3109720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 3119720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator==(const _CharT* __s, 3129720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const basic_string<_CharT,_Traits,_Alloc>& __y) { 3139720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_FIX_LITERAL_BUG(__s) 3149720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block size_t __n = _Traits::length(__s); 3159720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return __n == __y.size() && _Traits::compare(__s, __y.data(), __n) == 0; 3169720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 3179720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 3189720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc> 3199720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 3209720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator==(const basic_string<_CharT,_Traits,_Alloc>& __x, 3219720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const _CharT* __s) { 3229720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_FIX_LITERAL_BUG(__s) 3239720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block size_t __n = _Traits::length(__s); 3249720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return __x.size() == __n && _Traits::compare(__x.data(), __s, __n) == 0; 3259720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 3269720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 3279720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_USE_TEMPLATE_EXPRESSION) 3289720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir> 3299720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 3309720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator==(const _CharT* __s, 3319720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y) { 3329720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_FIX_LITERAL_BUG(__s) 3339720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block size_t __n = _Traits::length(__s); 3349720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return __n == __y.size() && _Traits::compare(__s, __y.data(), __n) == 0; 3359720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 3369720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 3379720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir> 3389720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 3399720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator==(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x, 3409720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const _CharT* __s) { 3419720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_FIX_LITERAL_BUG(__s) 3429720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block size_t __n = _Traits::length(__s); 3439720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return __x.size() == __n && _Traits::compare(__x.data(), __s, __n) == 0; 3449720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 3459720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* _STLP_USE_TEMPLATE_EXPRESSION */ 3469720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 3479720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block// Operator< (and also >, <=, and >=). 3489720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 3499720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc> 3509720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 3519720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator<(const basic_string<_CharT,_Traits,_Alloc>& __x, 3529720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const basic_string<_CharT,_Traits,_Alloc>& __y) { 3539720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return basic_string<_CharT,_Traits,_Alloc> ::_M_compare(__x.begin(), __x.end(), 3549720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block __y.begin(), __y.end()) < 0; 3559720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 3569720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 3579720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_USE_TEMPLATE_EXPRESSION) 3589720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir> 3599720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 3609720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator<(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x, 3619720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const basic_string<_CharT,_Traits,_Alloc>& __y) { 3629720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return basic_string<_CharT,_Traits,_Alloc> ::_M_compare(__x.begin(), __x.end(), 3639720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block __y.begin(), __y.end()) < 0; 3649720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 3659720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 3669720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir> 3679720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 3689720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator<(const basic_string<_CharT,_Traits,_Alloc>& __x, 3699720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y) { 3709720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return basic_string<_CharT,_Traits,_Alloc> ::_M_compare(__x.begin(), __x.end(), 3719720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block __y.begin(), __y.end()) < 0; 3729720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 3739720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* _STLP_USE_TEMPLATE_EXPRESSION */ 3749720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 3759720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc> 3769720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 3779720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator<(const _CharT* __s, 3789720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const basic_string<_CharT,_Traits,_Alloc>& __y) { 3799720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_FIX_LITERAL_BUG(__s) 3809720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block size_t __n = _Traits::length(__s); 3819720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return basic_string<_CharT,_Traits,_Alloc> ::_M_compare(__s, __s + __n, 3829720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block __y.begin(), __y.end()) < 0; 3839720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 3849720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 3859720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc> 3869720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 3879720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator<(const basic_string<_CharT,_Traits,_Alloc>& __x, 3889720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const _CharT* __s) { 3899720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_FIX_LITERAL_BUG(__s) 3909720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block size_t __n = _Traits::length(__s); 3919720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return basic_string<_CharT,_Traits,_Alloc> ::_M_compare(__x.begin(), __x.end(), 3929720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block __s, __s + __n) < 0; 3939720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 3949720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 3959720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_USE_TEMPLATE_EXPRESSION) 3969720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir> 3979720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 3989720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator<(const _CharT* __s, 3999720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y) { 4009720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_FIX_LITERAL_BUG(__s) 4019720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block size_t __n = _Traits::length(__s); 4029720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return basic_string<_CharT,_Traits,_Alloc> ::_M_compare(__s, __s + __n, 4039720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block __y.begin(), __y.end()) < 0; 4049720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 4059720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 4069720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir> 4079720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 4089720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator<(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x, 4099720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const _CharT* __s) { 4109720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_FIX_LITERAL_BUG(__s) 4119720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block size_t __n = _Traits::length(__s); 4129720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return basic_string<_CharT,_Traits,_Alloc> ::_M_compare(__x.begin(), __x.end(), 4139720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block __s, __s + __n) < 0; 4149720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 4159720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* _STLP_USE_TEMPLATE_EXPRESSION */ 4169720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 4179720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_USE_SEPARATE_RELOPS_NAMESPACE) 4189720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 4199720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block/* Only defined if _STLP_USE_SEPARATE_RELOPS_NAMESPACE is defined otherwise 4209720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * it might introduce ambiguity with pure template relational operators 4219720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block * from rel_ops namespace. 4229720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block */ 4239720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc> 4249720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 4259720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator!=(const basic_string<_CharT,_Traits,_Alloc>& __x, 4269720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const basic_string<_CharT,_Traits,_Alloc>& __y) 4279720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block{ return !(__x == __y); } 4289720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 4299720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc> 4309720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 4319720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator>(const basic_string<_CharT,_Traits,_Alloc>& __x, 4329720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const basic_string<_CharT,_Traits,_Alloc>& __y) 4339720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block{ return __y < __x; } 4349720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 4359720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc> 4369720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 4379720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator<=(const basic_string<_CharT,_Traits,_Alloc>& __x, 4389720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const basic_string<_CharT,_Traits,_Alloc>& __y) 4399720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block{ return !(__y < __x); } 4409720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 4419720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc> 4429720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 4439720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator>=(const basic_string<_CharT,_Traits,_Alloc>& __x, 4449720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const basic_string<_CharT,_Traits,_Alloc>& __y) 4459720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block{ return !(__x < __y); } 4469720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 4479720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# if defined (_STLP_USE_TEMPLATE_EXPRESSION) 4489720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir> 4499720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 4509720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator!=(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x, 4519720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const basic_string<_CharT,_Traits,_Alloc>& __y) 4529720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block{ return !(__x==__y); } 4539720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 4549720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir> 4559720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 4569720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator!=(const basic_string<_CharT,_Traits,_Alloc>& __x, 4579720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y) 4589720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block{ return !(__x==__y); } 4599720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block# endif 4609720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 4619720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */ 4629720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 4639720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc> 4649720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 4659720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator!=(const _CharT* __s, 4669720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const basic_string<_CharT,_Traits,_Alloc>& __y) { 4679720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_FIX_LITERAL_BUG(__s) 4689720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return !(__s == __y); 4699720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 4709720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 4719720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc> 4729720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 4739720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator!=(const basic_string<_CharT,_Traits,_Alloc>& __x, 4749720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const _CharT* __s) { 4759720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_FIX_LITERAL_BUG(__s) 4769720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return !(__x == __s); 4779720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 4789720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 4799720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_USE_TEMPLATE_EXPRESSION) 4809720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir> 4819720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 4829720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator!=(const _CharT* __s, 4839720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y) { 4849720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_FIX_LITERAL_BUG(__s) 4859720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return !(__s == __y); 4869720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 4879720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 4889720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir> 4899720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 4909720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator!=(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x, 4919720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const _CharT* __s) { 4929720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_FIX_LITERAL_BUG(__s) 4939720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return !(__x == __s); 4949720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 4959720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* _STLP_USE_TEMPLATE_EXPRESSION */ 4969720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 4979720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc> 4989720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 4999720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator>(const _CharT* __s, 5009720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const basic_string<_CharT,_Traits,_Alloc>& __y) { 5019720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_FIX_LITERAL_BUG(__s) 5029720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return __y < __s; 5039720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 5049720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 5059720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc> 5069720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 5079720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator>(const basic_string<_CharT,_Traits,_Alloc>& __x, 5089720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const _CharT* __s) { 5099720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_FIX_LITERAL_BUG(__s) 5109720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return __s < __x; 5119720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 5129720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 5139720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_USE_TEMPLATE_EXPRESSION) 5149720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir> 5159720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 5169720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator>(const _CharT* __s, 5179720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y) { 5189720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_FIX_LITERAL_BUG(__s) 5199720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return __y < __s; 5209720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 5219720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 5229720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir> 5239720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 5249720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator>(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x, 5259720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const _CharT* __s) { 5269720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_FIX_LITERAL_BUG(__s) 5279720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return __s < __x; 5289720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 5299720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* _STLP_USE_TEMPLATE_EXPRESSION */ 5309720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 5319720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc> 5329720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 5339720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator<=(const _CharT* __s, 5349720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const basic_string<_CharT,_Traits,_Alloc>& __y) { 5359720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_FIX_LITERAL_BUG(__s) 5369720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return !(__y < __s); 5379720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 5389720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 5399720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc> 5409720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 5419720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator<=(const basic_string<_CharT,_Traits,_Alloc>& __x, 5429720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const _CharT* __s) { 5439720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_FIX_LITERAL_BUG(__s) 5449720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return !(__s < __x); 5459720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 5469720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 5479720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_USE_TEMPLATE_EXPRESSION) 5489720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir> 5499720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 5509720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator<=(const _CharT* __s, 5519720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y) { 5529720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_FIX_LITERAL_BUG(__s) 5539720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return !(__y < __s); 5549720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 5559720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 5569720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir> 5579720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 5589720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator<=(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x, 5599720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const _CharT* __s) { 5609720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_FIX_LITERAL_BUG(__s) 5619720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return !(__s < __x); 5629720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 5639720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* _STLP_USE_TEMPLATE_EXPRESSION */ 5649720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 5659720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc> 5669720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 5679720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator>=(const _CharT* __s, 5689720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const basic_string<_CharT,_Traits,_Alloc>& __y) { 5699720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_FIX_LITERAL_BUG(__s) 5709720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return !(__s < __y); 5719720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 5729720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 5739720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc> 5749720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 5759720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator>=(const basic_string<_CharT,_Traits,_Alloc>& __x, 5769720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const _CharT* __s) { 5779720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_FIX_LITERAL_BUG(__s) 5789720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return !(__x < __s); 5799720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 5809720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 5819720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#if defined (_STLP_USE_TEMPLATE_EXPRESSION) 5829720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir> 5839720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 5849720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator>=(const _CharT* __s, 5859720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y) { 5869720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_FIX_LITERAL_BUG(__s) 5879720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return !(__s < __y); 5889720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 5899720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 5909720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blocktemplate <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir> 5919720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockinline bool _STLP_CALL 5929720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Blockoperator>=(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x, 5939720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block const _CharT* __s) { 5949720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block _STLP_FIX_LITERAL_BUG(__s) 5959720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block return !(__x < __s); 5969720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block} 5979720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* _STLP_USE_TEMPLATE_EXPRESSION */ 5989720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 5999720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block_STLP_END_NAMESPACE 6009720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 6019720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block#endif /* _STLP_STRING_OPERATORS_H */ 6029720d5f59b9c1f5d1b9ecbc9173dbcb71bd557beSteve Block 603