mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-23 03:43:28 +01:00
parent
4c7b7d04fe
commit
df0b0e64e1
@ -77,13 +77,16 @@ This can be useful on certain platforms that do not provide the standard iostrea
|
|||||||
|
|
||||||
## Fallback stringifier
|
## Fallback stringifier
|
||||||
|
|
||||||
By default Catch's stringification machinery falls back to a "{?}". To
|
By default, when Catch's stringification machinery has to stringify
|
||||||
let projects reuse their own existing stringification machinery, this
|
a type that does not specialize `StringMaker`, does not overload `operator<<`,
|
||||||
fallback can be overridden by defining `CATCH_CONFIG_FALLBACK_STRINGIFIER`
|
is not an enumeration and is not a range, it uses `"{?}"`. This can be
|
||||||
to a name of a function that should perform the stringification instead.
|
overriden by defining `CATCH_CONFIG_FALLBACK_STRINGIFIER` to name of a
|
||||||
|
function that should perform the stringification instead.
|
||||||
|
|
||||||
The provided function must return std::string and must accept any type
|
All types that do not provide `StringMaker` specialization or `operator<<`
|
||||||
(e.g. via overloading).
|
overload will be sent to this function (this includes enums and ranges).
|
||||||
|
The provided function must return `std::string` and must accept any type,
|
||||||
|
e.g. via overloading.
|
||||||
|
|
||||||
_Note that if the provided function does not handle a type and this type
|
_Note that if the provided function does not handle a type and this type
|
||||||
requires to be stringified, the compilation will fail._
|
requires to be stringified, the compilation will fail._
|
||||||
|
Loading…
Reference in New Issue
Block a user