Agora  1.2.0
Agora project
fmt::v8::basic_string_view< Char > Class Template Reference

#include <core.h>

Public Types

using value_type = Char
 
using iterator = const Char *
 

Public Member Functions

constexpr basic_string_view () throw ()
 
constexpr basic_string_view (const Char *s, size_t count) throw ()
 
 basic_string_view (const Char *s)
 
template<typename Traits , typename Alloc >
 basic_string_view (const std::basic_string< Char, Traits, Alloc > &s) throw ()
 
template<typename S , enable_if_t<(std::is_same< S, detail::std_string_view< Char >>::value), int > = 0>
 basic_string_view (S s) throw ()
 
constexpr auto data () const -> const Char * throw ()
 
constexpr auto size () const -> size_t throw ()
 
constexpr auto begin () const -> iterator throw ()
 
constexpr auto end () const -> iterator throw ()
 
constexpr auto operator[] (size_t pos) const -> const Char & throw ()
 
void remove_prefix (size_t n) throw ()
 
auto compare (basic_string_view other) const -> int
 

Private Attributes

const Char * data_
 
size_t size_
 

Friends

auto operator== (basic_string_view lhs, basic_string_view rhs) -> bool
 
auto operator!= (basic_string_view lhs, basic_string_view rhs) -> bool
 
auto operator< (basic_string_view lhs, basic_string_view rhs) -> bool
 
auto operator<= (basic_string_view lhs, basic_string_view rhs) -> bool
 
auto operator> (basic_string_view lhs, basic_string_view rhs) -> bool
 
auto operator>= (basic_string_view lhs, basic_string_view rhs) -> bool
 

Detailed Description

template<typename Char>
class fmt::v8::basic_string_view< Char >

An implementation of std::basic_string_view for pre-C++17. It provides a subset of the API. fmt::basic_string_view is used for format strings even if std::string_view is available to prevent issues when a library is compiled with a different -std option than the client code (which is not recommended).

Member Typedef Documentation

◆ iterator

template<typename Char >
using fmt::v8::basic_string_view< Char >::iterator = const Char*

◆ value_type

template<typename Char >
using fmt::v8::basic_string_view< Char >::value_type = Char

Constructor & Destructor Documentation

◆ basic_string_view() [1/5]

template<typename Char >
constexpr fmt::v8::basic_string_view< Char >::basic_string_view ( )
throw (
)
inlineconstexpr

◆ basic_string_view() [2/5]

template<typename Char >
constexpr fmt::v8::basic_string_view< Char >::basic_string_view ( const Char *  s,
size_t  count 
)
throw (
)
inlineconstexpr

Constructs a string reference object from a C string and a size.

◆ basic_string_view() [3/5]

template<typename Char >
fmt::v8::basic_string_view< Char >::basic_string_view ( const Char *  s)
inline

\rst Constructs a string reference object from a C string computing the size with std::char_traits<Char>length. \endrst

◆ basic_string_view() [4/5]

template<typename Char >
template<typename Traits , typename Alloc >
fmt::v8::basic_string_view< Char >::basic_string_view ( const std::basic_string< Char, Traits, Alloc > &  s)
throw (
)
inline

Constructs a string reference from a std::basic_string object.

◆ basic_string_view() [5/5]

template<typename Char >
template<typename S , enable_if_t<(std::is_same< S, detail::std_string_view< Char >>::value), int > = 0>
fmt::v8::basic_string_view< Char >::basic_string_view ( s)
throw (
)
inline

Member Function Documentation

◆ begin()

template<typename Char >
constexpr auto fmt::v8::basic_string_view< Char >::begin ( ) const -> iterator
throw (
)
inlineconstexpr
Here is the caller graph for this function:

◆ compare()

template<typename Char >
auto fmt::v8::basic_string_view< Char >::compare ( basic_string_view< Char >  other) const -> int
inline

◆ data()

template<typename Char >
constexpr auto fmt::v8::basic_string_view< Char >::data ( ) const -> const Char*
throw (
)
inlineconstexpr

Returns a pointer to the string data.

Here is the caller graph for this function:

◆ end()

template<typename Char >
constexpr auto fmt::v8::basic_string_view< Char >::end ( ) const -> iterator
throw (
)
inlineconstexpr
Here is the caller graph for this function:

◆ operator[]()

template<typename Char >
constexpr auto fmt::v8::basic_string_view< Char >::operator[] ( size_t  pos) const -> const Char&
throw (
)
inlineconstexpr

◆ remove_prefix()

template<typename Char >
void fmt::v8::basic_string_view< Char >::remove_prefix ( size_t  n)
throw (
)
inline
Here is the caller graph for this function:

◆ size()

template<typename Char >
constexpr auto fmt::v8::basic_string_view< Char >::size ( ) const -> size_t
throw (
)
inlineconstexpr

Returns the string size.

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ operator!=

template<typename Char >
auto operator!= ( basic_string_view< Char >  lhs,
basic_string_view< Char >  rhs 
) -> bool
friend

◆ operator<

template<typename Char >
auto operator< ( basic_string_view< Char >  lhs,
basic_string_view< Char >  rhs 
) -> bool
friend

◆ operator<=

template<typename Char >
auto operator<= ( basic_string_view< Char >  lhs,
basic_string_view< Char >  rhs 
) -> bool
friend

◆ operator==

template<typename Char >
auto operator== ( basic_string_view< Char >  lhs,
basic_string_view< Char >  rhs 
) -> bool
friend

◆ operator>

template<typename Char >
auto operator> ( basic_string_view< Char >  lhs,
basic_string_view< Char >  rhs 
) -> bool
friend

◆ operator>=

template<typename Char >
auto operator>= ( basic_string_view< Char >  lhs,
basic_string_view< Char >  rhs 
) -> bool
friend

Member Data Documentation

◆ data_

template<typename Char >
const Char* fmt::v8::basic_string_view< Char >::data_
private

◆ size_

template<typename Char >
size_t fmt::v8::basic_string_view< Char >::size_
private

The documentation for this class was generated from the following file: