From df0b0e64e11e1dd3c8364630cfb41397d21795a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Mon, 14 May 2018 21:03:07 +0200 Subject: [PATCH] Make FALLBACK_STRINGIFIER documentation more explicit Related to #1024 --- docs/configuration.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index dca3109f..81bf292a 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -77,13 +77,16 @@ This can be useful on certain platforms that do not provide the standard iostrea ## Fallback stringifier -By default Catch's stringification machinery falls back to a "{?}". To -let projects reuse their own existing stringification machinery, this -fallback can be overridden by defining `CATCH_CONFIG_FALLBACK_STRINGIFIER` -to a name of a function that should perform the stringification instead. +By default, when Catch's stringification machinery has to stringify +a type that does not specialize `StringMaker`, does not overload `operator<<`, +is not an enumeration and is not a range, it uses `"{?}"`. This can be +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 -(e.g. via overloading). +All types that do not provide `StringMaker` specialization or `operator<<` +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 requires to be stringified, the compilation will fail._