mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 07:16:10 +01:00
Fix different operator<< overload sets used for SFINAE and insertion
This commit is contained in:
parent
f1faaa9c10
commit
6cede0101a
@ -22,6 +22,10 @@
|
||||
#include <string>
|
||||
#include <cstdint>
|
||||
|
||||
// We need a dummy global operator<< so we can bring it into Catch namespace later
|
||||
struct Catch_global_namespace_dummy {};
|
||||
std::ostream& operator<<(std::ostream&, Catch_global_namespace_dummy);
|
||||
|
||||
namespace Catch {
|
||||
|
||||
struct CaseSensitive { enum Choice {
|
||||
@ -63,6 +67,11 @@ namespace Catch {
|
||||
|
||||
std::ostream& operator << ( std::ostream& os, SourceLineInfo const& info );
|
||||
|
||||
// Bring in operator<< from global namespace into Catch namespace
|
||||
// This is necessary because the overload of operator<< above makes
|
||||
// lookup stop at namespace Catch
|
||||
using ::operator<<;
|
||||
|
||||
// Use this in variadic streaming macros to allow
|
||||
// >> +StreamEndStop
|
||||
// as well as
|
||||
|
@ -29,15 +29,7 @@
|
||||
#pragma warning(disable:4180) // We attempt to stream a function (address) by const&, which MSVC complains about but is harmless
|
||||
#endif
|
||||
|
||||
|
||||
// We need a dummy global operator<< so we can bring it into Catch namespace later
|
||||
struct Catch_global_namespace_dummy {};
|
||||
std::ostream& operator<<(std::ostream&, Catch_global_namespace_dummy);
|
||||
|
||||
namespace Catch {
|
||||
// Bring in operator<< from global namespace into Catch namespace
|
||||
using ::operator<<;
|
||||
|
||||
namespace Detail {
|
||||
|
||||
extern const std::string unprintableString;
|
||||
|
Loading…
Reference in New Issue
Block a user