 |
SeqAn3
3.0.1
The Modern C++ library for sequence analysis.
|
|
Go to the documentation of this file.
41 template <
size_t capacity_>
85 static_assert(N <= capacity_ + 1,
"Length of string literal exceeds capacity of small_string.");
118 static_assert(N <= capacity_ + 1,
"Length of string literal exceeds capacity of small_string.");
138 constexpr
void assign(
char const (&_lit)[N]) noexcept
140 static_assert(N <= capacity_ + 1,
"Length of string literal exceeds capacity of small_string.");
141 assert(_lit[N - 1] ==
'\0');
142 assign(&_lit[0], &_lit[N-1]);
160 template <std::forward_iterator begin_it_type,
typename end_it_type>
162 requires std::sentinel_for<end_it_type, begin_it_type> &&
165 constexpr
void assign(begin_it_type begin_it, end_it_type end_it) noexcept
191 constexpr
void clear() noexcept
201 assert(sz < capacity_);
224 assert(
count <= capacity_);
226 for (
size_t i = sz; i <
count; ++i)
253 assert(index <= this->
size());
277 template <
size_t capacity2>
282 tmp.
insert(tmp.end(), rhs.begin(), rhs.end());
320 constexpr
char const *
c_str() const noexcept
381 assert(num_char > 0);
391 is.
setstate(std::ios_base::failbit);
407 small_string(
char const (&)[N]) -> small_string<N - 1>;
416 small_string(
char const) -> small_string<1>;
constexpr iterator erase(const_iterator begin_it, const_iterator end_it) noexcept
Removes specified elements from the container.
Definition: small_vector.hpp:705
constexpr size_type size() const noexcept
Returns the number of elements in the container, i.e. std::distance(begin(), end()).
Definition: small_vector.hpp:511
A constexpr vector implementation with dynamic size at compile time.
Definition: small_vector.hpp:44
constexpr void pop_back() noexcept
Removes the last element of the container.
Definition: small_string.hpp:208
constexpr iterator insert(const_iterator pos, value_type const value) noexcept(is_noexcept)
Inserts value before position in the container.
Definition: small_vector.hpp:597
constexpr void clear() noexcept
Removes all elements from the container.
Definition: small_string.hpp:192
constexpr void resize(size_type const count, char const value) noexcept
Resizes the container to contain count elements.
Definition: small_string.hpp:222
constexpr small_string & operator=(char const (&_lit)[N]) noexcept
Assign from literal.
Definition: small_string.hpp:116
The std::constructible_from concept specifies that a variable of type T can be initialized with the g...
typename reference< t >::type reference_t
Shortcut for seqan3::reference (transformation_trait shortcut).
Definition: pre.hpp:77
friend std::ostream & operator<<(std::ostream &os, small_string const &str)
Formatted output for the seqan3::small_string.
Definition: small_string.hpp:354
constexpr const_iterator cend() const noexcept
Returns iterator past the end of the vector.
Definition: small_vector.hpp:345
Implements a small string that can be used for compile time computations.
Definition: small_string.hpp:42
constexpr void assign(char const (&_lit)[N]) noexcept
Assign from literal.
Definition: small_string.hpp:138
value_type * iterator
The iterator type.
Definition: small_vector.hpp:57
friend std::istream & operator>>(std::istream &is, small_string &str)
Formatted input for the seqan3::small_string.
Definition: small_string.hpp:371
constexpr iterator begin() noexcept
Returns the begin to the string.
Definition: small_vector.hpp:315
constexpr friend small_string< capacity_+capacity2 > operator+(small_string const &lhs, small_string< capacity2 > const &rhs) noexcept
Concatenates two small_strings by returning a new small_string.
Definition: small_string.hpp:278
static constexpr size_type capacity() noexcept
Returns the maximal capacity.
Definition: small_string.hpp:182
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:36
ptrdiff_t difference_type
The difference_type type.
Definition: small_vector.hpp:59
constexpr const_iterator cbegin() const noexcept
Returns the begin to the string.
Definition: small_vector.hpp:327
constexpr small_string & erase(size_type index=0, size_type count=max_size()) noexcept
Removes specified elements from the container.
Definition: small_string.hpp:251
Exposes the size_type of another type.
Definition: pre.hpp:188
const value_type & const_reference
The const_reference type.
Definition: small_vector.hpp:56
constexpr void assign(begin_it_type begin_it, end_it_type end_it) noexcept
Assign from pair of iterators.
Definition: small_string.hpp:165
detail::min_viable_uint_t< capacity_ > size_type
The size_type type.
Definition: small_vector.hpp:60
constexpr const char * c_str() const noexcept
Returns the content represented as 0-terminated c-style string.
Definition: small_string.hpp:320
constexpr void assign(std::initializer_list< value_type > ilist) noexcept(is_noexcept)
Assign from std::initializer_list.
Definition: small_vector.hpp:238
value_type & reference
The reference type.
Definition: small_vector.hpp:55
char value_type
The value_type type.
Definition: small_vector.hpp:54
std::string str() const
Returns the content represented as std::string.
Definition: small_string.hpp:303
constexpr small_string(char const (&_lit)[N]) noexcept
Construction from literal.
Definition: small_string.hpp:83
constexpr small_string(char const c) noexcept
Construction from char.
Definition: small_string.hpp:96
constexpr void push_back(char const value) noexcept
Appends the given element value to the end of the container.
Definition: small_string.hpp:199
A constexpr vector implementation with dynamic size at compile time.
constexpr void resize(size_type const count) noexcept
Resizes the container to contain count elements.
Definition: small_string.hpp:216
constexpr ptrdiff_t count
Count the occurrences of a type in a pack.
Definition: traits.hpp:134
static constexpr size_type max_size() noexcept
Returns the maximal size which equals the capacity.
Definition: small_string.hpp:176
value_type const * const_iterator
The const_iterator type.
Definition: small_vector.hpp:58