File tree Expand file tree Collapse file tree 6 files changed +24
-11
lines changed Expand file tree Collapse file tree 6 files changed +24
-11
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,4 @@ namespace mongo {
4242 return OpTime (t, i);
4343 }
4444
45- std::ostream& operator <<(std::ostream &s, const OpTime &ot) {
46- return s << ot.toString ();
47- }
4845}
Original file line number Diff line number Diff line change @@ -144,6 +144,4 @@ namespace mongo {
144144 };
145145#pragma pack()
146146
147- std::ostream& operator <<(std::ostream &s, const OpTime &ot);
148-
149147} // namespace mongo
Original file line number Diff line number Diff line change 5050#include " mongo/util/log.h"
5151
5252namespace mongo {
53+
54+ // So that you can ASSERT_EQUALS two OpTimes
55+ std::ostream& operator <<( std::ostream &s, const OpTime &ot ) {
56+ s << ot.toString ();
57+ return s;
58+ }
59+ // So that you can ASSERT_EQUALS two Date_ts
60+ std::ostream& operator <<( std::ostream &s, const Date_t &t ) {
61+ s << t.toString ();
62+ return s;
63+ }
64+
5365namespace repl {
5466namespace {
5567
Original file line number Diff line number Diff line change 3636#include " mongo/util/time_support.h"
3737
3838namespace mongo {
39+
40+ // So that you can ASSERT_EQUALS two OpTimes
41+ std::ostream& operator <<( std::ostream &s, const OpTime &ot ) {
42+ s << ot.toString ();
43+ return s;
44+ }
45+ // So that you can ASSERT_EQUALS two Date_ts
46+ std::ostream& operator <<( std::ostream &s, const Date_t &t ) {
47+ s << t.toString ();
48+ return s;
49+ }
50+
3951namespace repl {
4052namespace {
4153
Original file line number Diff line number Diff line change @@ -70,10 +70,6 @@ namespace mongo {
7070 }
7171 }
7272
73- std::ostream& operator <<(std::ostream &s, const Date_t &t) {
74- return s << t.toString ();
75- }
76-
7773 // jsTime_virtual_skew is just for testing. a test command manipulates it.
7874 long long jsTime_virtual_skew = 0 ;
7975 boost::thread_specific_ptr<long long > jsTime_virtual_thread_skew;
Original file line number Diff line number Diff line change @@ -64,8 +64,6 @@ namespace mongo {
6464 bool isFormatable () const ;
6565 };
6666
67- std::ostream& operator <<(std::ostream &s, const Date_t &t);
68-
6967 // uses ISO 8601 dates without trailing Z
7068 // colonsOk should be false when creating filenames
7169 std::string terseCurrentTime (bool colonsOk=true );
You can’t perform that action at this time.
0 commit comments