BDE 4.14.0 Production release
Loading...
Searching...
No Matches
testing::internal::bslim_Gtestutil_TestingStreamHolder Class Reference

#include <bslim_gtestutil.h>

Public Member Functions

 bslim_Gtestutil_TestingStreamHolder (bsl::ostream *stream)
 Create an object bound to the specified stream.
 
 operator bsl::ostream * () const
 Implicitly return a pointer to the stream this object is bound to.
 

Detailed Description

This class serves as a type in the testing namespace to be passed to an unqualified call to PrintTo. By supplying bslim_Gtestutil_TestingStreamHolder(&stream), which is implicitly convertible to bsl::ostream *, we supply an argument in the testing namespace in the UniversalPrint call within the bsl::PrintTo(const optional<TYPE>&, ...) call below, which will affect ADL to draw in UniversalPrint declarations from the testing namespace into consideration. For detailed discussion, see IMPLEMENTATION NOTE in the implementation file.

See bslim_gtestutil

Constructor & Destructor Documentation

◆ bslim_Gtestutil_TestingStreamHolder()

testing::internal::bslim_Gtestutil_TestingStreamHolder::bslim_Gtestutil_TestingStreamHolder ( bsl::ostream *  stream)
inlineexplicit

Member Function Documentation

◆ operator bsl::ostream *()

testing::internal::bslim_Gtestutil_TestingStreamHolder::operator bsl::ostream * ( ) const
inline

The documentation for this class was generated from the following file: