mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 21:36:11 +01:00
Refactor StreamEndStop slightly
This commit is contained in:
parent
d05a8e2e24
commit
66ab942903
@ -33,8 +33,4 @@ namespace Catch {
|
|||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string StreamEndStop::operator+() const {
|
|
||||||
return std::string();
|
|
||||||
}
|
|
||||||
|
|
||||||
} // end namespace Catch
|
} // end namespace Catch
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#define TWOBLUECUBES_CATCH_COMMON_H_INCLUDED
|
#define TWOBLUECUBES_CATCH_COMMON_H_INCLUDED
|
||||||
|
|
||||||
#include <catch2/internal/catch_compiler_capabilities.hpp>
|
#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_LINE2( name, line ) name##line
|
||||||
#define INTERNAL_CATCH_UNIQUE_NAME_LINE( name, line ) INTERNAL_CATCH_UNIQUE_NAME_LINE2( 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
|
// as well as
|
||||||
// >> stuff +StreamEndStop
|
// >> stuff +StreamEndStop
|
||||||
struct StreamEndStop {
|
struct StreamEndStop {
|
||||||
std::string operator+() const;
|
StringRef operator+() const {
|
||||||
|
return StringRef();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
friend T const& operator + ( T const& value, StreamEndStop ) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
template<typename T>
|
|
||||||
T const& operator + ( T const& value, StreamEndStop ) {
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define CATCH_INTERNAL_LINEINFO \
|
#define CATCH_INTERNAL_LINEINFO \
|
||||||
|
Loading…
Reference in New Issue
Block a user