Skip to content

Commit

Permalink
Improve PR catchorg#562 to support non-copy-constructable type
Browse files Browse the repository at this point in the history
  • Loading branch information
0x1997 committed Mar 7, 2016
1 parent 1c07600 commit 24efde4
Show file tree
Hide file tree
Showing 2 changed files with 536 additions and 510 deletions.
6 changes: 3 additions & 3 deletions include/internal/catch_result_builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ namespace Catch {

template <typename T>
struct AnyTypeHolder : AnyTypeHolderBase {
AnyTypeHolder( const T& value ) : value ( value ) {}
std::string toString() { return Catch::toString( value ); }
const typename Decay<const T>::type value;
AnyTypeHolder( const T& value ) : ref ( value ) {}
std::string toString() { return Catch::toString( ref ); }
const typename Decay<const T>::type& ref;
};

class ResultBuilder {
Expand Down
Loading

0 comments on commit 24efde4

Please sign in to comment.