12 #ifndef EASTL_FIXED_STRING_H
13 #define EASTL_FIXED_STRING_H
15 #include <EASTL/internal/config.h>
16 #include <EASTL/string.h>
17 #include <EASTL/internal/fixed_pool.h>
19 #if defined(EA_PRAGMA_ONCE_SUPPORTED)
32 #ifndef EASTL_FIXED_STRING_DEFAULT_NAME
33 #define EASTL_FIXED_STRING_DEFAULT_NAME EASTL_DEFAULT_NAME_PREFIX " fixed_string"
73 template <
typename T,
int nodeCount,
bool bEnableOverflow = true,
typename OverflowAllocator = EASTLAllocatorType>
74 class fixed_string :
public basic_string<T, fixed_vector_allocator<sizeof(T), nodeCount, EASTL_ALIGN_OF(T), 0, bEnableOverflow, OverflowAllocator> >
79 typedef typename fixed_allocator_type::overflow_allocator_type overflow_allocator_type;
82 typedef typename base_type::size_type size_type;
83 typedef typename base_type::value_type value_type;
88 enum { kMaxSize = nodeCount - 1 };
90 using base_type::npos;
91 using base_type::mPair;
92 using base_type::append;
93 using base_type::resize;
94 using base_type::clear;
95 using base_type::capacity;
96 using base_type::size;
97 using base_type::sprintf_va_list;
98 using base_type::DoAllocate;
99 using base_type::DoFree;
100 using base_type::internalLayout;
101 using base_type::get_allocator;
106 value_type mArray[1];
112 explicit fixed_string(
const overflow_allocator_type& overflowAllocator);
120 fixed_string(
const value_type* pBegin,
const value_type* pEnd);
129 this_type& operator=(
const value_type* p);
130 this_type& operator=(
const value_type c);
136 void set_capacity(size_type n);
137 void reset_lose_memory();
138 size_type max_size()
const;
140 bool has_overflowed()
const;
141 bool can_overflow()
const;
145 this_type substr(size_type position, size_type n)
const;
150 const overflow_allocator_type& get_overflow_allocator()
const EA_NOEXCEPT;
151 overflow_allocator_type& get_overflow_allocator() EA_NOEXCEPT;
152 void set_overflow_allocator(
const overflow_allocator_type&
allocator);
163 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
165 : base_type(fixed_allocator_type(mBuffer.buffer))
167 #if EASTL_NAME_ENABLED
168 get_allocator().set_name(EASTL_FIXED_STRING_DEFAULT_NAME);
171 internalLayout().SetHeapBeginPtr(mArray);
172 internalLayout().SetHeapCapacity(nodeCount - 1);
173 internalLayout().SetHeapSize(0);
175 *internalLayout().HeapBeginPtr() = 0;
179 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
180 inline fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::fixed_string(
const overflow_allocator_type& overflowAllocator)
181 : base_type(fixed_allocator_type(mBuffer.buffer, overflowAllocator))
183 #if EASTL_NAME_ENABLED
184 get_allocator().set_name(EASTL_FIXED_STRING_DEFAULT_NAME);
187 internalLayout().SetHeapBeginPtr(mArray);
188 internalLayout().SetHeapCapacity(nodeCount - 1);
189 internalLayout().SetHeapSize(0);
191 *internalLayout().HeapBeginPtr() = 0;
195 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
196 inline fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::fixed_string(
const this_type& x)
197 : base_type(fixed_allocator_type(mBuffer.buffer))
199 get_allocator().copy_overflow_allocator(x.get_allocator());
201 #if EASTL_NAME_ENABLED
202 get_allocator().set_name(x.get_allocator().get_name());
205 internalLayout().SetHeapBeginPtr(mArray);
206 internalLayout().SetHeapCapacity(nodeCount - 1);
207 internalLayout().SetHeapSize(0);
209 *internalLayout().HeapBeginPtr() = 0;
215 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
216 inline fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::fixed_string(
const this_type& x,
const overflow_allocator_type& overflowAllocator)
217 : base_type(fixed_allocator_type(mBuffer.buffer, overflowAllocator))
219 get_allocator().copy_overflow_allocator(x.get_allocator());
221 #if EASTL_NAME_ENABLED
222 get_allocator().set_name(x.get_allocator().get_name());
225 internalLayout().SetHeapBeginPtr(mArray);
226 internalLayout().SetHeapCapacity(nodeCount - 1);
227 internalLayout().SetHeapSize(0);
229 *internalLayout().HeapBeginPtr() = 0;
235 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
236 inline fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::fixed_string(
const base_type& x)
237 : base_type(fixed_allocator_type(mBuffer.buffer))
239 #if EASTL_NAME_ENABLED
240 get_allocator().set_name(x.get_allocator().get_name());
243 internalLayout().SetHeapBeginPtr(mArray);
244 internalLayout().SetHeapCapacity(nodeCount - 1);
245 internalLayout().SetHeapSize(0);
247 *internalLayout().HeapBeginPtr() = 0;
253 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
254 inline fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::fixed_string(
const base_type& x, size_type position, size_type n)
255 : base_type(fixed_allocator_type(mBuffer.buffer))
257 #if EASTL_NAME_ENABLED
258 get_allocator().set_name(x.get_allocator().get_name());
261 internalLayout().SetHeapBeginPtr(mArray);
262 internalLayout().SetHeapCapacity(nodeCount - 1);
263 internalLayout().SetHeapSize(0);
265 *internalLayout().HeapBeginPtr() = 0;
267 append(x, position, n);
271 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
272 inline fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::fixed_string(
const value_type* p, size_type n)
273 : base_type(fixed_allocator_type(mBuffer.buffer))
275 #if EASTL_NAME_ENABLED
276 get_allocator().set_name(EASTL_FIXED_STRING_DEFAULT_NAME);
279 internalLayout().SetHeapBeginPtr(mArray);
280 internalLayout().SetHeapCapacity(nodeCount - 1);
281 internalLayout().SetHeapSize(0);
283 *internalLayout().HeapBeginPtr() = 0;
289 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
290 inline fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::fixed_string(
const value_type* p)
291 : base_type(fixed_allocator_type(mBuffer.buffer))
293 #if EASTL_NAME_ENABLED
294 get_allocator().set_name(EASTL_FIXED_STRING_DEFAULT_NAME);
297 internalLayout().SetHeapBeginPtr(mArray);
298 internalLayout().SetHeapCapacity(nodeCount - 1);
299 internalLayout().SetHeapSize(0);
301 *internalLayout().HeapBeginPtr() = 0;
307 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
308 inline fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::fixed_string(size_type n,
const value_type& value)
309 : base_type(fixed_allocator_type(mBuffer.buffer))
311 #if EASTL_NAME_ENABLED
312 get_allocator().set_name(EASTL_FIXED_STRING_DEFAULT_NAME);
315 internalLayout().SetHeapBeginPtr(mArray);
316 internalLayout().SetHeapCapacity(nodeCount - 1);
317 internalLayout().SetHeapSize(0);
319 *internalLayout().HeapBeginPtr() = 0;
325 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
326 inline fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::fixed_string(
const value_type* pBegin,
const value_type* pEnd)
327 : base_type(fixed_allocator_type(mBuffer.buffer))
329 #if EASTL_NAME_ENABLED
330 get_allocator().set_name(EASTL_FIXED_STRING_DEFAULT_NAME);
333 internalLayout().SetHeapBeginPtr(mArray);
334 internalLayout().SetHeapCapacity(nodeCount - 1);
335 internalLayout().SetHeapSize(0);
337 *internalLayout().HeapBeginPtr() = 0;
339 append(pBegin, pEnd);
343 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
344 inline fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::fixed_string(CtorDoNotInitialize, size_type n)
345 : base_type(fixed_allocator_type(mBuffer.buffer))
347 #if EASTL_NAME_ENABLED
348 get_allocator().set_name(EASTL_FIXED_STRING_DEFAULT_NAME);
351 internalLayout().SetHeapBeginPtr(mArray);
352 internalLayout().SetHeapCapacity(nodeCount - 1);
356 internalLayout().SetHeapSize(n);
357 *internalLayout().HeapEndPtr() = 0;
361 internalLayout().SetHeapSize(0);
362 *internalLayout().HeapEndPtr() = 0;
369 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
370 inline fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::fixed_string(CtorSprintf,
const value_type* pFormat, ...)
371 : base_type(fixed_allocator_type(mBuffer.buffer))
373 #if EASTL_NAME_ENABLED
374 get_allocator().set_name(EASTL_FIXED_STRING_DEFAULT_NAME);
377 internalLayout().SetHeapBeginPtr(mArray);
378 internalLayout().SetHeapCapacity(nodeCount - 1);
379 internalLayout().SetHeapSize(0);
380 *internalLayout().HeapBeginPtr() = 0;
383 va_start(arguments, pFormat);
384 sprintf_va_list(pFormat, arguments);
389 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
390 inline fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::fixed_string(
std::initializer_list<T> ilist,
const overflow_allocator_type& overflowAllocator)
391 : base_type(fixed_allocator_type(mBuffer.buffer, overflowAllocator))
393 #if EASTL_NAME_ENABLED
394 get_allocator().set_name(EASTL_FIXED_STRING_DEFAULT_NAME);
397 internalLayout().SetHeapBeginPtr(mArray);
398 internalLayout().SetHeapCapacity(nodeCount - 1);
399 internalLayout().SetHeapSize(0);
401 *internalLayout().HeapBeginPtr() = 0;
403 append(ilist.begin(), ilist.end());
407 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
408 inline fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::fixed_string(this_type&& x)
409 : base_type(fixed_allocator_type(mBuffer.buffer))
412 #if EASTL_NAME_ENABLED
413 get_allocator().set_name(x.get_allocator().get_name());
416 internalLayout().SetHeapBeginPtr(mArray);
417 internalLayout().SetHeapCapacity(nodeCount - 1);
418 internalLayout().SetHeapSize(0);
420 *internalLayout().HeapBeginPtr() = 0;
425 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
426 inline fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::fixed_string(this_type&& x,
const overflow_allocator_type& overflowAllocator)
427 : base_type(fixed_allocator_type(mBuffer.buffer, overflowAllocator))
430 #if EASTL_NAME_ENABLED
431 get_allocator().set_name(x.get_allocator().get_name());
434 internalLayout().SetHeapBeginPtr(mArray);
435 internalLayout().SetHeapCapacity(nodeCount - 1);
436 internalLayout().SetHeapSize(0);
438 *internalLayout().HeapBeginPtr() = 0;
444 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
445 inline typename fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::this_type&
446 fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::operator=(
const this_type& x)
452 #if EASTL_ALLOCATOR_COPY_ENABLED
453 get_allocator() = x.get_allocator();
462 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
463 inline typename fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::
464 this_type& fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::operator=(
const base_type& x)
466 if(
static_cast<base_type*
>(
this) != &x)
470 #if EASTL_ALLOCATOR_COPY_ENABLED
471 get_allocator() = x.get_allocator();
480 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
481 inline typename fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::
482 this_type& fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::operator=(
const value_type* p)
484 if(internalLayout().HeapBeginPtr() != p)
493 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
494 inline typename fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::
495 this_type& fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::operator=(
const value_type c)
498 append((size_type)1, c);
503 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
504 inline typename fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::
505 this_type& fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::operator=(
std::initializer_list<T> ilist)
508 append(ilist.begin(), ilist.end());
513 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
514 inline typename fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::
515 this_type& fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::operator=(this_type&& x)
523 #if EASTL_ALLOCATOR_COPY_ENABLED
524 get_allocator() = x.get_allocator();
533 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
534 inline void fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::swap(this_type& x)
537 eastl::fixed_swap(*
this, x);
541 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
542 inline void fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::set_capacity(size_type n)
544 const size_type nPrevSize = internalLayout().GetSize();
545 const size_type nPrevCapacity = capacity();
550 if(n != nPrevCapacity)
552 const size_type allocSize = (n + 1);
554 if(can_overflow() && (((uintptr_t)internalLayout().HeapBeginPtr() != (uintptr_t)mBuffer.buffer) || (allocSize > kMaxSize)))
556 T*
const pNewData = (allocSize <= kMaxSize) ? (T*)&mBuffer.buffer[0] : DoAllocate(allocSize);
557 T*
const pCopyEnd = (n < nPrevSize) ? (internalLayout().HeapBeginPtr() + n) : internalLayout().HeapEndPtr();
558 CharStringUninitializedCopy(internalLayout().HeapBeginPtr(), pCopyEnd, pNewData);
559 if((uintptr_t)internalLayout().HeapBeginPtr() != (uintptr_t)mBuffer.buffer)
560 DoFree(internalLayout().HeapBeginPtr(), internalLayout().GetHeapCapacity() + 1);
562 internalLayout().SetHeapSize((size_type)(pCopyEnd - internalLayout().HeapBeginPtr()));
563 internalLayout().SetHeapBeginPtr(pNewData);
564 internalLayout().SetHeapCapacity(allocSize - 1);
566 else if(n < nPrevSize)
572 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
573 inline void fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::reset_lose_memory()
575 internalLayout().SetHeapBeginPtr(mArray);
576 internalLayout().SetHeapSize(0);
577 internalLayout().SetHeapCapacity(nodeCount - 1);
581 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
582 inline typename fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::
583 size_type fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::max_size()
const
589 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
590 inline bool fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::full()
const
594 return ((
size_t)(internalLayout().HeapEndPtr() - internalLayout().HeapBeginPtr()) >= kMaxSize) || ((
void*)internalLayout().HeapBeginPtr() != (
void*)mBuffer.buffer);
598 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
599 inline bool fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::has_overflowed()
const
605 return ((
void*)internalLayout().HeapBeginPtr() != (
void*)mBuffer.buffer);
609 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
610 inline bool fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::can_overflow()
const
612 return bEnableOverflow;
616 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
617 inline typename fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::
618 this_type fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::substr(size_type position, size_type n)
const
620 #if EASTL_STRING_OPT_RANGE_ERRORS
621 if(position > internalLayout().GetSize())
622 base_type::ThrowRangeException();
625 return fixed_string(internalLayout().HeapBeginPtr() + position,
626 internalLayout().HeapBeginPtr() + position +
eastl::min_alt(n, internalLayout().GetSize() - position));
630 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
631 inline typename fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::
632 this_type fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::left(size_type n)
const
634 const size_type nLength = size();
636 return fixed_string(internalLayout().HeapBeginPtr(), internalLayout().HeapBeginPtr() + n);
641 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
642 inline typename fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::
643 this_type fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::right(size_type n)
const
645 const size_type nLength = size();
647 return fixed_string(internalLayout().HeapEndPtr() - n, internalLayout().HeapEndPtr());
652 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
653 inline const typename fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::
654 overflow_allocator_type& fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::get_overflow_allocator() const EA_NOEXCEPT
656 return get_allocator().get_overflow_allocator();
660 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
661 inline typename fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::
662 overflow_allocator_type& fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::get_overflow_allocator() EA_NOEXCEPT
664 return get_allocator().get_overflow_allocator();
668 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
670 fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::set_overflow_allocator(
const overflow_allocator_type& allocator)
672 get_allocator().set_overflow_allocator(allocator);
682 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
683 fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator> operator+(
const fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>& a,
684 const fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>& b)
688 typedef fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator> this_type;
690 this_type result(
const_cast<this_type&
>(a).get_overflow_allocator());
697 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
698 fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator> operator+(
const typename fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::value_type* p,
699 const fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>& b)
701 typedef fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator> this_type;
703 const typename this_type::size_type n = (
typename this_type::size_type)CharStrlen(p);
704 this_type result(
const_cast<this_type&
>(b).get_overflow_allocator());
705 result.append(p, p + n);
711 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
712 fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator> operator+(
typename fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::value_type c,
713 const fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>& b)
715 typedef fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator> this_type;
717 this_type result(
const_cast<this_type&
>(b).get_overflow_allocator());
724 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
725 fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator> operator+(
const fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>& a,
726 const typename fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::value_type* p)
728 typedef fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator> this_type;
730 const typename this_type::size_type n = (
typename this_type::size_type)CharStrlen(p);
731 this_type result(
const_cast<this_type&
>(a).get_overflow_allocator());
733 result.append(p, p + n);
738 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
739 fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator> operator+(
const fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>& a,
740 typename fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::value_type c)
742 typedef fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator> this_type;
744 this_type result(
const_cast<this_type&
>(a).get_overflow_allocator());
751 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
752 fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator> operator+(fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>&& a,
753 fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>&& b)
759 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
760 fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator> operator+(fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>&& a,
761 const fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>& b)
767 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
768 fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator> operator+(
const typename fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::value_type* p,
769 fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>&& b)
775 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
776 fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator> operator+(fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>&& a,
777 const typename fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::value_type* p)
783 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
784 fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator> operator+(fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>&& a,
785 typename fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>::value_type c)
794 template <
typename T,
int nodeCount,
bool bEnableOverflow,
typename OverflowAllocator>
795 inline void swap(fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>& a,
796 fixed_string<T, nodeCount, bEnableOverflow, OverflowAllocator>& b)
799 eastl::fixed_swap(a, b);
Definition: allocator.h:52
Definition: fixed_string.h:75
Definition: fixed_pool.h:1329
Definition: initializer_list.h:38
EA Standard Template Library.
Definition: algorithm.h:288
OutputIterator move(InputIterator first, InputIterator last, OutputIterator result)
Definition: copy_help.h:170
EA_CONSTEXPR eastl::enable_if< eastl::is_scalar< T >::value, T >::type min_alt(T a, T b)
Definition: algorithm.h:472
Definition: fixed_pool.h:82
'npos' means non-valid position or simply non-position.
Definition: string.h:302