Bitcoin Core  31.0.0
P2P Digital Currency
Classes | Namespaces | Functions | Variables
common.h File Reference
#include <ostream>
#include <optional>
#include <string>
Include dependency graph for common.h:

Go to the source code of this file.

Classes

class  HasReason
 BOOST_CHECK_EXCEPTION predicates to check the specific validation error. More...
 

Namespaces

 std
 

Functions

template<typename T >
requires std::is_enum_v< T > std::ostream & std::operator<< (std::ostream &os, const T &e)
 
template<typename T >
std::ostream & std::operator<< (std::ostream &os, const std::optional< T > &v)
 
template<HasToString T>
std::ostream & operator<< (std::ostream &os, const T &obj)
 

Variables

template<typename T >
concept HasToString = requires(const T& t) { t.ToString(); }
 

Function Documentation

◆ operator<<()

template<HasToString T>
std::ostream& operator<< ( std::ostream &  os,
const T &  obj 
)
inline

Definition at line 48 of file common.h.

Variable Documentation

◆ HasToString

template<typename T >
concept HasToString = requires(const T& t) { t.ToString(); }

Definition at line 45 of file common.h.