ManaPlus
Data Structures | Functions | Variables
Catch::Detail Namespace Reference

Data Structures

struct  BorgType
 
struct  TrueType
 
struct  FalseType
 
struct  IsStreamInsertable
 
struct  StringMakerBase
 
struct  StringMakerBase< true >
 
class  Approx
 

Functions

TrueTypetestStreamable (std::ostream &)
 
FalseType testStreamable (FalseType)
 
FalseType operator<< (std::ostream const &, BorgType const &)
 
std::string rawMemoryToString (const void *object, std::size_t size)
 
template<typename T >
std::string rawMemoryToString (const T &object)
 
template<typename InputIterator >
std::string rangeToString (InputIterator first, InputIterator last)
 
template<typename T >
std::string makeString (T const &value)
 

Variables

const std::string unprintableString
 

Function Documentation

◆ makeString()

template<typename T >
std::string Catch::Detail::makeString ( T const &  value)

Definition at line 1761 of file catch.hpp.

1761  {
1762  return StringMaker<T>::convert( value );
1763  }

References Catch::Detail::StringMakerBase< Detail::IsStreamInsertable< T >::value >::convert().

Referenced by Catch::Matchers::Contains(), Catch::Matchers::EndsWith(), Catch::Matchers::Equals(), and Catch::Matchers::StartsWith().

◆ operator<<()

FalseType Catch::Detail::operator<< ( std::ostream const &  ,
BorgType const &   
)

◆ rangeToString()

template<typename InputIterator >
std::string Catch::Detail::rangeToString ( InputIterator  first,
InputIterator  last 
)

Definition at line 1780 of file catch.hpp.

1780  {
1781  std::ostringstream oss;
1782  oss << "{ ";
1783  if( first != last ) {
1784  oss << Catch::toString( *first );
1785  for( ++first ; first != last ; ++first )
1786  oss << ", " << Catch::toString( *first );
1787  }
1788  oss << " }";
1789  return oss.str();
1790  }
std::string toString(T const &value)
converts any type to a string
Definition: catch.hpp:1774

References Catch::toString().

Referenced by Catch::toString().

◆ rawMemoryToString() [1/2]

template<typename T >
std::string Catch::Detail::rawMemoryToString ( const T &  object)
inline

Definition at line 1669 of file catch.hpp.

1669  {
1670  return rawMemoryToString( &object, sizeof(object) );
1671  }
std::string rawMemoryToString(const T &object)
Definition: catch.hpp:1669

◆ rawMemoryToString() [2/2]

std::string Catch::Detail::rawMemoryToString ( const void *  object,
std::size_t  size 
)

◆ testStreamable() [1/2]

FalseType Catch::Detail::testStreamable ( FalseType  )

◆ testStreamable() [2/2]

TrueType& Catch::Detail::testStreamable ( std::ostream &  )

Variable Documentation

◆ unprintableString

const std::string Catch::Detail::unprintableString
extern