mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 21:36:11 +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 <string>
|
||||||
#include <cstdint>
|
#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 {
|
namespace Catch {
|
||||||
|
|
||||||
struct CaseSensitive { enum Choice {
|
struct CaseSensitive { enum Choice {
|
||||||
@ -63,6 +67,11 @@ namespace Catch {
|
|||||||
|
|
||||||
std::ostream& operator << ( std::ostream& os, SourceLineInfo const& info );
|
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
|
// Use this in variadic streaming macros to allow
|
||||||
// >> +StreamEndStop
|
// >> +StreamEndStop
|
||||||
// as well as
|
// 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
|
#pragma warning(disable:4180) // We attempt to stream a function (address) by const&, which MSVC complains about but is harmless
|
||||||
#endif
|
#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 {
|
namespace Catch {
|
||||||
// Bring in operator<< from global namespace into Catch namespace
|
|
||||||
using ::operator<<;
|
|
||||||
|
|
||||||
namespace Detail {
|
namespace Detail {
|
||||||
|
|
||||||
extern const std::string unprintableString;
|
extern const std::string unprintableString;
|
||||||
|
Loading…
Reference in New Issue
Block a user