30 #ifndef ALLOCATED_STRING_HXX 31 #define ALLOCATED_STRING_HXX 43 template<
typename T=
char>
65 :value(src.
Steal()) {}
90 *std::copy(begin, end, p) =
SENTINEL;
97 *std::copy_n(begin, length, p) =
SENTINEL;
102 std::swap(value, src.value);
107 return value ==
nullptr;
111 return value !=
nullptr;
115 return value ==
nullptr;
constexpr bool operator==(std::nullptr_t) const
const reference_type operator[](size_type i) const
constexpr bool IsNull() const
AllocatedString Clone() const
reference_type operator[](size_type i)
static constexpr value_type SENTINEL
static AllocatedString Empty()
StringPointer< T >::value_type value_type
static AllocatedString Donate(pointer_type value)
StringPointer< T >::const_pointer_type const_pointer_type
static AllocatedString Null()
static AllocatedString Duplicate(const_pointer_type src)
A string pointer whose memory is managed by this class.
const T * const_pointer_type
constexpr const_pointer_type c_str() const
AllocatedString & operator=(AllocatedString &&src)
constexpr bool operator!=(std::nullptr_t) const
static AllocatedString Duplicate(const_pointer_type begin, const_pointer_type end)
AllocatedString(AllocatedString &&src)
AllocatedString(std::nullptr_t n)
StringPointer< T >::pointer_type pointer_type
const T & const_reference_type
StringPointer< T >::const_reference_type const_reference_type
static AllocatedString Duplicate(const_pointer_type begin, size_type length)
StringPointer< T >::reference_type reference_type