diff options
| author | Martin Jeřábek | 2023-08-30 13:16:30 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2023-08-30 16:21:02 +0200 |
| commit | 3a5cde55b7a27a6d94ce994a8362b2425211bd5e (patch) | |
| tree | 310470491e8dbd48a20e0cd3360b031c5599538b /src/catch2 | |
| parent | 2a19ae16b87547f152f262e05a55c7b2b969807b (diff) | |
| download | catch3-3a5cde55b7a27a6d94ce994a8362b2425211bd5e.tar.gz | |
implement stringify for std::nullopt_t
Diffstat (limited to 'src/catch2')
| -rw-r--r-- | src/catch2/catch_tostring.hpp | 6 |
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 |