From 421ab160627d1490070f7310a10dae5b5616ded3 Mon Sep 17 00:00:00 2001 From: Phil Nash Date: Mon, 8 Jan 2018 15:15:44 +0000 Subject: [PATCH] Exclude string-literal arrays from automatic range serialisation These have specialised serialisers already anyway, and were causing ambiguities in VS 2015 & 2017 --- include/internal/catch_tostring.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/include/internal/catch_tostring.h b/include/internal/catch_tostring.h index 5ca019fc..0bcf6bbb 100644 --- a/include/internal/catch_tostring.h +++ b/include/internal/catch_tostring.h @@ -136,6 +136,18 @@ namespace Catch { static std::string convert(wchar_t * str); }; + template + struct is_string_array : std::false_type {}; + + template + struct is_string_array : std::true_type {}; + + template + struct is_string_array : std::true_type {}; + + template + struct is_string_array : std::true_type {}; + template struct StringMaker { static std::string convert(const char* str) { @@ -387,7 +399,7 @@ namespace Catch { } template - struct StringMaker::value>::type> { + struct StringMaker::value && !is_string_array::value>::type> { static std::string convert( R const& range ) { return rangeToString( range ); }