userver: userver/utils/small_string.hpp File Reference
Loading...
Searching...
No Matches
small_string.hpp File Reference

Detailed Description

An alternative to std::string with a custom SSO (small string optimization) container size. Unlike std::string, SmallString is not null-terminated thus it has no c_str(), data() returns a not null-terminated buffer.

Definition in file small_string.hpp.

Go to the source code of this file.

#include <cstddef>
#include <functional>
#include <stdexcept>
#include <string>
#include <boost/container/small_vector.hpp>
#include <userver/utils/assert.hpp>
+ Include dependency graph for small_string.hpp:
+ This graph shows which files directly or indirectly include this file:

Classes

class  utils::SmallString< N >
 An alternative to std::string with a custom SSO (small string optimization) container size. Unlike std::string, SmallString is not null-terminated thus it has no c_str(), data() returns a not null-terminated buffer. More...
 
struct  std::hash<::utils::SmallString< N > >
 

Namespaces

namespace  utils
 Utilities.
 

Functions

template<std::size_t N>
bool utils::operator== (const SmallString< N > &str, std::string_view sv)
 
template<std::size_t N>
bool utils::operator== (std::string_view sv, const SmallString< N > &str)
 
template<std::size_t N>
bool utils::operator== (const SmallString< N > &str1, const SmallString< N > &str2)
 
template<std::size_t N>
bool utils::operator!= (const SmallString< N > &str1, const SmallString< N > &str2)