Public Types | Public Member Functions | Private Attributes | Static Private Attributes | List of all members
Catch::StringRef Class Reference

#include <catch.hpp>

Public Types

using const_iterator = const char *
 
using size_type = std::size_t
 

Public Member Functions

constexpr const_iterator begin () const
 
auto c_str () const -> char const *
 
auto data () const noexcept-> char const *
 
constexpr auto empty () const noexcept-> bool
 
constexpr const_iterator end () const
 
constexpr auto isNullTerminated () const noexcept-> bool
 
 operator std::string () const
 
auto operator!= (StringRef const &other) const noexcept-> bool
 
auto operator== (StringRef const &other) const noexcept-> bool
 
auto operator[] (size_type index) const noexcept-> char
 
constexpr auto size () const noexcept-> size_type
 
constexpr StringRef () noexcept=default
 
 StringRef (char const *rawChars) noexcept
 
constexpr StringRef (char const *rawChars, size_type size) noexcept
 
 StringRef (std::string const &stdString) noexcept
 
auto substr (size_type start, size_type length) const noexcept-> StringRef
 

Private Attributes

size_type m_size = 0
 
char const * m_start = s_empty
 

Static Private Attributes

static constexpr char const *const s_empty = ""
 

Detailed Description

A non-owning string class (similar to the forthcoming std::string_view) Note that, because a StringRef may be a substring of another string, it may not be null terminated.

Definition at line 610 of file catch.hpp.

Member Typedef Documentation

using Catch::StringRef::const_iterator = const char*

Definition at line 613 of file catch.hpp.

using Catch::StringRef::size_type = std::size_t

Definition at line 612 of file catch.hpp.

Constructor & Destructor Documentation

constexpr Catch::StringRef::StringRef ( )
defaultnoexcept
Catch::StringRef::StringRef ( char const *  rawChars)
noexcept
constexpr Catch::StringRef::StringRef ( char const *  rawChars,
size_type  size 
)
inlinenoexcept

Definition at line 626 of file catch.hpp.

Catch::StringRef::StringRef ( std::string const &  stdString)
inlinenoexcept

Definition at line 631 of file catch.hpp.

Member Function Documentation

constexpr const_iterator Catch::StringRef::begin ( void  ) const
inline

Definition at line 677 of file catch.hpp.

auto Catch::StringRef::c_str ( ) const -> char const *
auto Catch::StringRef::data ( ) const -> char const *
noexcept
constexpr auto Catch::StringRef::empty ( void  ) const -> bool
inlinenoexcept

Definition at line 652 of file catch.hpp.

constexpr const_iterator Catch::StringRef::end ( void  ) const
inline

Definition at line 678 of file catch.hpp.

constexpr auto Catch::StringRef::isNullTerminated ( ) const -> bool
inlinenoexcept

Definition at line 672 of file catch.hpp.

Catch::StringRef::operator std::string ( ) const
inlineexplicit

Definition at line 636 of file catch.hpp.

auto Catch::StringRef::operator!= ( StringRef const &  other) const -> bool
inlinenoexcept

Definition at line 642 of file catch.hpp.

auto Catch::StringRef::operator== ( StringRef const &  other) const -> bool
noexcept
auto Catch::StringRef::operator[] ( size_type  index) const -> char
inlinenoexcept

Definition at line 646 of file catch.hpp.

constexpr auto Catch::StringRef::size ( void  ) const -> size_type
inlinenoexcept

Definition at line 655 of file catch.hpp.

auto Catch::StringRef::substr ( size_type  start,
size_type  length 
) const -> StringRef
noexcept

Member Data Documentation

size_type Catch::StringRef::m_size = 0
private

Definition at line 619 of file catch.hpp.

char const* Catch::StringRef::m_start = s_empty
private

Definition at line 618 of file catch.hpp.

constexpr char const* const Catch::StringRef::s_empty = ""
staticprivate

Definition at line 616 of file catch.hpp.


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


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:50:35