proxygen
FBString.h File Reference
#include <atomic>
#include <cstddef>
#include <iosfwd>
#include <limits>
#include <stdexcept>
#include <type_traits>
#include <folly/CppAttributes.h>
#include <folly/Portability.h>
#include <algorithm>
#include <cassert>
#include <cstring>
#include <string>
#include <utility>
#include <folly/Traits.h>
#include <folly/hash/Hash.h>
#include <folly/lang/Exception.h>
#include <folly/memory/Malloc.h>

Go to the source code of this file.

Classes

class  folly::fbstring_core< Char >
 
struct  folly::fbstring_core< Char >::RefCounted
 
struct  folly::fbstring_core< Char >::MediumLarge
 
class  folly::dummy_fbstring_core< Char >
 
class  folly::basic_fbstring< E, T, A, Storage >
 
struct  folly::basic_fbstring< E, T, A, Storage >::Invariant
 
struct  std::hash<::folly::basic_fbstring< char > >
 
struct  std::hash<::folly::basic_fbstring< char16_t > >
 
struct  std::hash<::folly::basic_fbstring< char32_t > >
 
struct  std::hash<::folly::basic_fbstring< wchar_t > >
 
struct  folly::IsSomeString< T >
 
struct  folly::IsSomeString< fbstring >
 

Namespaces

 folly
 —— Concurrent Priority Queue Implementation ——
 
 folly::fbstring_detail
 

Macros

#define FBSTRING_ASSERT(expr)   assert(expr)
 
#define FBSTRING_LIKELY(x)   (x)
 
#define FBSTRING_UNLIKELY(x)   (x)
 
#define throw   FOLLY_FBSTRING_MAY_NOT_USE_THROW
 
#define FOLLY_FBSTRING_BEGIN_NAMESPACE   namespace folly {
 
#define FOLLY_FBSTRING_END_NAMESPACE   }
 
#define FBSTRING_DISABLE_SSO   false
 
#define FBSTRING_ALWAYS_INLINE   inline
 
#define FOLLY_FBSTRING_HASH1(T)
 
#define FOLLY_FBSTRING_HASH
 

Typedefs

typedef basic_fbstring< char > folly::fbstring
 

Enumerations

enum  folly::AcquireMallocatedString
 

Functions

template<class InIt , class OutIt >
std::pair< InIt, OutIt > folly::fbstring_detail::copy_n (InIt b, typename std::iterator_traits< InIt >::difference_type n, OutIt d)
 
template<class Pod , class T >
void folly::fbstring_detail::podFill (Pod *b, Pod *e, T c)
 
template<class Pod >
void folly::fbstring_detail::podCopy (const Pod *b, const Pod *e, Pod *d)
 
template<class Pod >
void folly::fbstring_detail::podMove (const Pod *b, const Pod *e, Pod *d)
 
void folly::fbstring_detail::assume_unreachable ()
 
template<typename E , class T , class A , class S >
basic_fbstring< E, T, A, Sfolly::operator+ (const basic_fbstring< E, T, A, S > &lhs, const basic_fbstring< E, T, A, S > &rhs)
 
template<typename E , class T , class A , class S >
basic_fbstring< E, T, A, Sfolly::operator+ (basic_fbstring< E, T, A, S > &&lhs, const basic_fbstring< E, T, A, S > &rhs)
 
template<typename E , class T , class A , class S >
basic_fbstring< E, T, A, Sfolly::operator+ (const basic_fbstring< E, T, A, S > &lhs, basic_fbstring< E, T, A, S > &&rhs)
 
template<typename E , class T , class A , class S >
basic_fbstring< E, T, A, Sfolly::operator+ (basic_fbstring< E, T, A, S > &&lhs, basic_fbstring< E, T, A, S > &&rhs)
 
template<typename E , class T , class A , class S >
basic_fbstring< E, T, A, Sfolly::operator+ (const E *lhs, const basic_fbstring< E, T, A, S > &rhs)
 
template<typename E , class T , class A , class S >
basic_fbstring< E, T, A, Sfolly::operator+ (const E *lhs, basic_fbstring< E, T, A, S > &&rhs)
 
template<typename E , class T , class A , class S >
basic_fbstring< E, T, A, Sfolly::operator+ (E lhs, const basic_fbstring< E, T, A, S > &rhs)
 
template<typename E , class T , class A , class S >
basic_fbstring< E, T, A, Sfolly::operator+ (E lhs, basic_fbstring< E, T, A, S > &&rhs)
 
template<typename E , class T , class A , class S >
basic_fbstring< E, T, A, Sfolly::operator+ (const basic_fbstring< E, T, A, S > &lhs, const E *rhs)
 
template<typename E , class T , class A , class S >
basic_fbstring< E, T, A, Sfolly::operator+ (basic_fbstring< E, T, A, S > &&lhs, const E *rhs)
 
template<typename E , class T , class A , class S >
basic_fbstring< E, T, A, Sfolly::operator+ (const basic_fbstring< E, T, A, S > &lhs, E rhs)
 
template<typename E , class T , class A , class S >
basic_fbstring< E, T, A, Sfolly::operator+ (basic_fbstring< E, T, A, S > &&lhs, E rhs)
 
template<typename E , class T , class A , class S >
bool folly::operator== (const basic_fbstring< E, T, A, S > &lhs, const basic_fbstring< E, T, A, S > &rhs)
 
template<typename E , class T , class A , class S >
bool folly::operator== (const typename basic_fbstring< E, T, A, S >::value_type *lhs, const basic_fbstring< E, T, A, S > &rhs)
 
template<typename E , class T , class A , class S >
bool folly::operator== (const basic_fbstring< E, T, A, S > &lhs, const typename basic_fbstring< E, T, A, S >::value_type *rhs)
 
template<typename E , class T , class A , class S >
bool folly::operator!= (const basic_fbstring< E, T, A, S > &lhs, const basic_fbstring< E, T, A, S > &rhs)
 
template<typename E , class T , class A , class S >
bool folly::operator!= (const typename basic_fbstring< E, T, A, S >::value_type *lhs, const basic_fbstring< E, T, A, S > &rhs)
 
template<typename E , class T , class A , class S >
bool folly::operator!= (const basic_fbstring< E, T, A, S > &lhs, const typename basic_fbstring< E, T, A, S >::value_type *rhs)
 
template<typename E , class T , class A , class S >
bool folly::operator< (const basic_fbstring< E, T, A, S > &lhs, const basic_fbstring< E, T, A, S > &rhs)
 
template<typename E , class T , class A , class S >
bool folly::operator< (const basic_fbstring< E, T, A, S > &lhs, const typename basic_fbstring< E, T, A, S >::value_type *rhs)
 
template<typename E , class T , class A , class S >
bool folly::operator< (const typename basic_fbstring< E, T, A, S >::value_type *lhs, const basic_fbstring< E, T, A, S > &rhs)
 
template<typename E , class T , class A , class S >
bool folly::operator> (const basic_fbstring< E, T, A, S > &lhs, const basic_fbstring< E, T, A, S > &rhs)
 
template<typename E , class T , class A , class S >
bool folly::operator> (const basic_fbstring< E, T, A, S > &lhs, const typename basic_fbstring< E, T, A, S >::value_type *rhs)
 
template<typename E , class T , class A , class S >
bool folly::operator> (const typename basic_fbstring< E, T, A, S >::value_type *lhs, const basic_fbstring< E, T, A, S > &rhs)
 
template<typename E , class T , class A , class S >
bool folly::operator<= (const basic_fbstring< E, T, A, S > &lhs, const basic_fbstring< E, T, A, S > &rhs)
 
template<typename E , class T , class A , class S >
bool folly::operator<= (const basic_fbstring< E, T, A, S > &lhs, const typename basic_fbstring< E, T, A, S >::value_type *rhs)
 
template<typename E , class T , class A , class S >
bool folly::operator<= (const typename basic_fbstring< E, T, A, S >::value_type *lhs, const basic_fbstring< E, T, A, S > &rhs)
 
template<typename E , class T , class A , class S >
bool folly::operator>= (const basic_fbstring< E, T, A, S > &lhs, const basic_fbstring< E, T, A, S > &rhs)
 
template<typename E , class T , class A , class S >
bool folly::operator>= (const basic_fbstring< E, T, A, S > &lhs, const typename basic_fbstring< E, T, A, S >::value_type *rhs)
 
template<typename E , class T , class A , class S >
bool folly::operator>= (const typename basic_fbstring< E, T, A, S >::value_type *lhs, const basic_fbstring< E, T, A, S > &rhs)
 
template<typename E , class T , class A , class S >
void folly::swap (basic_fbstring< E, T, A, S > &lhs, basic_fbstring< E, T, A, S > &rhs)
 
template<typename E , class T , class A , class S >
std::basic_istream< typename basic_fbstring< E, T, A, S >::value_type, typename basic_fbstring< E, T, A, S >::traits_type > & folly::operator>> (std::basic_istream< typename basic_fbstring< E, T, A, S >::value_type, typename basic_fbstring< E, T, A, S >::traits_type > &is, basic_fbstring< E, T, A, S > &str)
 
template<typename E , class T , class A , class S >
std::basic_ostream< typename basic_fbstring< E, T, A, S >::value_type, typename basic_fbstring< E, T, A, S >::traits_type > & folly::operator<< (std::basic_ostream< typename basic_fbstring< E, T, A, S >::value_type, typename basic_fbstring< E, T, A, S >::traits_type > &os, const basic_fbstring< E, T, A, S > &str)
 
template<typename E , class T , class A , class S , class A2 >
bool folly::operator== (const basic_fbstring< E, T, A, S > &lhs, const std::basic_string< E, T, A2 > &rhs)
 
template<typename E , class T , class A , class S , class A2 >
bool folly::operator== (const std::basic_string< E, T, A2 > &lhs, const basic_fbstring< E, T, A, S > &rhs)
 
template<typename E , class T , class A , class S , class A2 >
bool folly::operator!= (const basic_fbstring< E, T, A, S > &lhs, const std::basic_string< E, T, A2 > &rhs)
 
template<typename E , class T , class A , class S , class A2 >
bool folly::operator!= (const std::basic_string< E, T, A2 > &lhs, const basic_fbstring< E, T, A, S > &rhs)
 
template<typename E , class T , class A , class S , class A2 >
bool folly::operator< (const basic_fbstring< E, T, A, S > &lhs, const std::basic_string< E, T, A2 > &rhs)
 
template<typename E , class T , class A , class S , class A2 >
bool folly::operator> (const basic_fbstring< E, T, A, S > &lhs, const std::basic_string< E, T, A2 > &rhs)
 
template<typename E , class T , class A , class S , class A2 >
bool folly::operator< (const std::basic_string< E, T, A2 > &lhs, const basic_fbstring< E, T, A, S > &rhs)
 
template<typename E , class T , class A , class S , class A2 >
bool folly::operator> (const std::basic_string< E, T, A2 > &lhs, const basic_fbstring< E, T, A, S > &rhs)
 
template<typename E , class T , class A , class S , class A2 >
bool folly::operator<= (const basic_fbstring< E, T, A, S > &lhs, const std::basic_string< E, T, A2 > &rhs)
 
template<typename E , class T , class A , class S , class A2 >
bool folly::operator>= (const basic_fbstring< E, T, A, S > &lhs, const std::basic_string< E, T, A2 > &rhs)
 
template<typename E , class T , class A , class S , class A2 >
bool folly::operator<= (const std::basic_string< E, T, A2 > &lhs, const basic_fbstring< E, T, A, S > &rhs)
 
template<typename E , class T , class A , class S , class A2 >
bool folly::operator>= (const std::basic_string< E, T, A2 > &lhs, const basic_fbstring< E, T, A, S > &rhs)
 
template<class T , class R , class A , class S >
 folly::FOLLY_ASSUME_RELOCATABLE (basic_fbstring< T, R, A, S >)
 

Macro Definition Documentation

#define FBSTRING_ALWAYS_INLINE   inline

Definition at line 199 of file FBString.h.

#define FBSTRING_ASSERT (   expr)    assert(expr)

Definition at line 64 of file FBString.h.

Referenced by folly::basic_fbstring< E, T, A, Storage >::append(), folly::basic_fbstring< E, T, A, Storage >::assign(), folly::basic_fbstring< char >::back(), folly::fbstring_core< Char >::copyLarge(), folly::fbstring_core< Char >::copyMedium(), folly::fbstring_core< Char >::copySmall(), folly::fbstring_core< Char >::RefCounted::decrementRefs(), folly::fbstring_core< char >::destroyMediumLarge(), folly::fbstring_core< Char >::expandNoinit(), folly::fbstring_core< char >::fbstring_core(), folly::basic_fbstring< E, T, A, Storage >::find(), folly::basic_fbstring< E, T, A, Storage >::getlineImpl(), folly::basic_fbstring< E, T, A, Storage >::insertImpl(), folly::basic_fbstring< E, T, A, Storage >::insertImplDiscr(), folly::basic_fbstring< E, T, A, Storage >::Invariant::Invariant(), folly::fbstring_core< Char >::mutableDataLarge(), folly::fbstring_detail::podCopy(), folly::fbstring_detail::podFill(), folly::fbstring_detail::podMove(), folly::basic_fbstring< char >::pop_back(), folly::fbstring_core< Char >::RefCounted::reallocate(), folly::basic_fbstring< E, T, A, Storage >::replaceImpl(), folly::basic_fbstring< E, T, A, Storage >::replaceImplDiscr(), folly::fbstring_core< char >::reserve(), folly::fbstring_core< Char >::reserveLarge(), folly::fbstring_core< Char >::reserveMedium(), folly::fbstring_core< Char >::reserveSmall(), folly::basic_fbstring< E, T, A, Storage >::resize(), folly::fbstring_core< char >::setSmallSize(), folly::dummy_fbstring_core< Char >::shrink(), folly::fbstring_core< Char >::shrinkLarge(), folly::fbstring_core< Char >::shrinkMedium(), folly::fbstring_core< Char >::shrinkSmall(), folly::fbstring_core< char >::smallSize(), folly::fbstring_core< Char >::unshare(), and folly::basic_fbstring< E, T, A, Storage >::Invariant::~Invariant().

#define FBSTRING_DISABLE_SSO   false

Definition at line 124 of file FBString.h.

Referenced by folly::fbstring_core< char >::reserve().

#define FOLLY_FBSTRING_BEGIN_NAMESPACE   namespace folly {

Definition at line 99 of file FBString.h.

#define FOLLY_FBSTRING_END_NAMESPACE   }

Definition at line 100 of file FBString.h.

#define FOLLY_FBSTRING_HASH
Value:
#define FOLLY_FBSTRING_HASH1(T)
Definition: FBString.h:2922

Definition at line 2931 of file FBString.h.

#define FOLLY_FBSTRING_HASH1 (   T)
Value:
template <> \
struct hash<::folly::basic_fbstring<T>> { \
size_t operator()(const ::folly::basic_fbstring<T>& s) const { \
return ::folly::hash::fnv32_buf(s.data(), s.size() * sizeof(T)); \
} \
};
#define T(v)
Definition: http_parser.c:233
uint32_t fnv32_buf(const void *buf, size_t n, uint32_t hash=FNV_32_HASH_START) noexcept
Definition: Hash.h:163
static set< string > s

Definition at line 2922 of file FBString.h.

#define throw   FOLLY_FBSTRING_MAY_NOT_USE_THROW

Definition at line 89 of file FBString.h.