7 #include "arg_router/basic_types.hpp"
104 [[nodiscard]]
operator std::string_view() const noexcept {
return view_; }
113 return view_ == other.view_;
123 return !(*
this == other);
132 template <
typename T,
137 str_ += std::forward<T>(other);
157 [[nodiscard]]
bool empty() const noexcept {
return view_.empty(); }
173 swap(a.view_, b.view_);
174 swap(a.str_, b.str_);
176 if (!a.str_.empty()) {
179 if (!b.str_.empty()) {
185 void update_view() { view_ = str_; }
187 std::string_view view_;
199 return stream << static_cast<std::string_view>(dsv);
210 template <
typename T>
213 a += std::forward<T>(b);
dynamic_string_view(dynamic_string_view &&other) noexcept
string::const_reference const_reference
! Reference type
string::size_type size_type
! Size type
const_iterator end() const noexcept
bool operator!=(const dynamic_string_view &other) const noexcept
dynamic_string_view(string &&str) noexcept
const_iterator begin() const noexcept
string::difference_type difference_type
! Difference type
friend void swap(dynamic_string_view &a, dynamic_string_view &b)
string::const_pointer const_pointer
! Pointer type
bool operator==(const dynamic_string_view &other) const noexcept
string::value_type value_type
! Value type
string::allocator_type allocator_type
! Allocator type
dynamic_string_view & operator=(dynamic_string_view other)
dynamic_string_view(const dynamic_string_view &other)
dynamic_string_view & operator+=(T &&other)
dynamic_string_view(const char *str) noexcept
bool empty() const noexcept
size_type internal_storage_size() const noexcept
size_type size() const noexcept
dynamic_string_view(std::string_view sv={}) noexcept
std::string_view::const_iterator const_iterator
! Iterator type
void convert_to_internal_storage()
std::ostream & operator<<(std::ostream &stream, const dynamic_string_view &dsv)
dynamic_string_view operator+(dynamic_string_view a, T &&b)