21namespace sequoia::testing
30 template<std::formattable<
char> T>
34 static std::string make(
const T& val)
36 return std::format(
"{}", val);
40 template<serializable_to<std::
stringstream> T>
41 requires (!std::formattable<T, char>)
45 static std::string make(
const T& val)
47 std::ostringstream os{};
48 os << std::boolalpha << val;
58 template<serializable T>
60 std::string to_string(
const T& value)
73 requires (std::is_unsigned_v<T> && (
sizeof(T) ==
sizeof(uint64_t)))
76 using type = uint64_t;
80 requires (std::is_unsigned_v<T> && (
sizeof(T) ==
sizeof(uint32_t)))
83 using type = uint32_t;
87 using type_normalizer_t =
typename type_normalizer<T>::type;
89 template<std::
integral T>
91 auto fixed_width_unsigned_cast(T x)
noexcept
93 using U = std::make_unsigned_t<T>;
95 return static_cast<type_normalizer_t<U>
>(x);
101 std::string top_level_message{};
Concepts which are sufficiently general to appear in the sequoia namespace.
Definition: CoreInfrastructure.hpp:54
Specialize this struct template to provide custom serialization of a given class. .
Definition: CoreInfrastructure.hpp:28
Primary class template for converting unsigned types of implementation-defined size into fixed-width ...
Definition: CoreInfrastructure.hpp:68
Definition: CoreInfrastructure.hpp:99