Refactor StreamEndStop slightly

This commit is contained in:
Martin Hořeňovský 2020-05-30 15:43:37 +02:00
parent d05a8e2e24
commit 66ab942903
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A
2 changed files with 9 additions and 9 deletions

View File

@ -33,8 +33,4 @@ namespace Catch {
return os;
}
std::string StreamEndStop::operator+() const {
return std::string();
}
} // end namespace Catch

View File

@ -9,6 +9,7 @@
#define TWOBLUECUBES_CATCH_COMMON_H_INCLUDED
#include <catch2/internal/catch_compiler_capabilities.hpp>
#include <catch2/internal/catch_stringref.hpp>
#define INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) name##line
#define INTERNAL_CATCH_UNIQUE_NAME_LINE( name, line ) INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line )
@ -70,12 +71,15 @@ namespace Catch {
// as well as
// >> stuff +StreamEndStop
struct StreamEndStop {
std::string operator+() const;
};
StringRef operator+() const {
return StringRef();
}
template<typename T>
T const& operator + ( T const& value, StreamEndStop ) {
friend T const& operator + ( T const& value, StreamEndStop ) {
return value;
}
};
}
#define CATCH_INTERNAL_LINEINFO \