diff --git a/include/internal/catch_result_builder.h b/include/internal/catch_result_builder.h index 49a621e6..1060195e 100644 --- a/include/internal/catch_result_builder.h +++ b/include/internal/catch_result_builder.h @@ -39,11 +39,20 @@ namespace Catch { virtual std::string toString() = 0; }; + template + struct Decay { typedef T type; }; + + template + struct Decay { typedef T* type; }; + + template + struct Decay { typedef T* type; }; + template struct AnyTypeHolder : AnyTypeHolderBase { AnyTypeHolder( const T& value ) : value ( value ) {} std::string toString() { return Catch::toString( value ); } - T value; + const typename Decay::type value; }; class ResultBuilder {