gz-cpp-util 1.3
A c++20 library containing various utilities
gz::util::ConvertibleToStringGlobal Concept Reference

toString function overload exists in global namespace and returns std::string More...

#include <to_string.hpp>

Concept definition

template<typename T>
requires(const T& t) {
{ ::toString(t) } -> std::same_as<std::string>;
}
can construct std::string from T
Definition: to_string.hpp:30
toString function overload exists in global namespace and returns std::string
Definition: to_string.hpp:62
has .to_string() const member
Definition: to_string.hpp:45
has .toString() const member
Definition: to_string.hpp:38
same as std::string, std::string_view or const char*
Definition: to_string.hpp:26
works with std::to_string()
Definition: to_string.hpp:53
std::string toString(const T &s)
Declaration of toString in global namespace, so that concepts can use it.

Detailed Description

toString function overload exists in global namespace and returns std::string