gz-cpp-util 1.3
A c++20 library containing various utilities
|
Contains functions to convert types to string. More...
Go to the source code of this file.
Concepts | |
concept | gz::util::Stringy |
same as std::string, std::string_view or const char* | |
concept | gz::util::CanConstructString |
can construct std::string from T | |
concept | gz::util::HasToStringMember |
has .toString() const member | |
concept | gz::util::HasToStringMember2 |
has .to_string() const member | |
concept | gz::util::WorksWithStdToString |
works with std::to_string() | |
concept | gz::util::ConvertibleToStringGlobal |
toString function overload exists in global namespace and returns std::string | |
concept | gz::util::Vector2ConvertibleToString |
Type having string-convertible x, y members and sizeof(T) == 2 * sizeof(x) | |
concept | gz::util::Vector3ConvertibleToString |
Type having string-convertible x, y, z members and sizeof(T) == 3 * sizeof(x) | |
concept | gz::util::Vector4ConvertibleToString |
Type having string-convertible x, y, z, w members and sizeof(T) == 4 * sizeof(x) | |
concept | gz::util::Extent2DConvertibleToString |
Type having string-convertible width, height members and sizeof(T) == 2 * sizeof(width) | |
concept | gz::util::Extent3DConvertibleToString |
Type having string-convertible width, height, depth members and sizeof(T) == 3 * sizeof(width) | |
concept | gz::util::_ConvertibleToString |
Everything that is convertible to string with toString at this point. | |
concept | gz::util::ForwardRangeConvertibleToString |
Forward range having string-convertible elements. | |
concept | gz::util::PairConvertibleToString |
Pair having string-convertible elements. | |
concept | gz::util::MapConvertibleToString |
Container having string-convertible pairs. | |
concept | gz::ConvertibleToString |
Any type where gz::toString(t) exists. | |
Functions | |
template<gz::util::False T> | |
std::string | toString (const T &s) |
Declaration of toString in global namespace, so that concepts can use it. | |
1) Converting a type to string | |
All toString functions for types that satisfy util::ToStringBasicNoPtr or util::PtrToToStringBasicType | |
template<util::Stringy T> | |
std::string | gz::toString (const T &t) |
Return the string. More... | |
Contains functions to convert types to string.
|
inline |
Return the string.
Construct a string from a forward range holding a pair, eg a map.
Construct a string from a pair.
Construct a string from a forward range.
Construct a string from the element the pointer points at.
Construct a string from a type having width and height members.
Construct a string from a vector with x, y, z, w members.
Construct a string from a vector with x, y members.
Construct a string from a type that has toString declared in global namespace.
Construct a string from a boolean.
Construct a string from a number.
Construct a string from a type having a to_string() const member function.
Construct a string from a type having a toString() const member function.
Construct a string from a string like-type.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Unlike std::to_string(bool), which returns 0 or 1, this function returns "true" or "false"
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.