Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorMartin Jeřábek2023-08-30 13:16:30 +0200
committerMartin Hořeňovský2023-08-30 16:21:02 +0200
commit3a5cde55b7a27a6d94ce994a8362b2425211bd5e (patch)
tree310470491e8dbd48a20e0cd3360b031c5599538b /src
parent2a19ae16b87547f152f262e05a55c7b2b969807b (diff)
downloadcatch3-3a5cde55b7a27a6d94ce994a8362b2425211bd5e.tar.gz
implement stringify for std::nullopt_t
Diffstat (limited to 'src')
-rw-r--r--src/catch2/catch_tostring.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/catch2/catch_tostring.hpp b/src/catch2/catch_tostring.hpp
index 788d824c..f3fb0beb 100644
--- a/src/catch2/catch_tostring.hpp
+++ b/src/catch2/catch_tostring.hpp
@@ -398,6 +398,12 @@ namespace Catch {
}
}
};
+ template <>
+ struct StringMaker<std::nullopt_t> {
+ static std::string convert(const std::nullopt_t&) {
+ return "{ }";
+ }
+ };
}
#endif // CATCH_CONFIG_ENABLE_OPTIONAL_STRINGMAKER