summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShaun Verch <shaun.verch@10gen.com>2013-10-03 10:20:22 -0400
committerShaun Verch <shaun.verch@10gen.com>2013-10-04 16:58:54 -0400
commit99372153dfe9dd9251e49371d872b5f27dfd6f2c (patch)
treeeeea035847d069421ea4aaf40c18bae48fd56941 /src
parentd61cdb37d5fcc83f649c912df2c590649935eac1 (diff)
downloadmongo-99372153dfe9dd9251e49371d872b5f27dfd6f2c.tar.gz
Fixed up dependencies of goodies.h
Diffstat (limited to 'src')
-rw-r--r--src/mongo/util/goodies.h25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/mongo/util/goodies.h b/src/mongo/util/goodies.h
index de449b2ccba..a19bb5dbd4a 100644
--- a/src/mongo/util/goodies.h
+++ b/src/mongo/util/goodies.h
@@ -18,9 +18,14 @@
#pragma once
+#include <iostream>
#include <sstream>
#include <boost/detail/endian.hpp>
+#include <boost/intrusive_ptr.hpp>
+#include <boost/scoped_array.hpp>
+#include <boost/scoped_ptr.hpp>
+#include <boost/shared_ptr.hpp>
#include "mongo/bson/util/misc.h"
@@ -31,7 +36,7 @@ namespace mongo {
template<class T>
inline string ToString(const T& t) {
- stringstream s;
+ std::stringstream s;
s << t;
return s.str();
}
@@ -48,16 +53,16 @@ namespace mongo {
while ( len > 0 ) {
for ( int i = 0; i < 16; i++ ) {
if ( *p >= 32 && *p <= 126 )
- cout << *p;
+ std::cout << *p;
else
- cout << '.';
+ std::cout << '.';
p++;
}
- cout << " ";
+ std::cout << " ";
p -= 16;
for ( int i = 0; i < 16; i++ )
- cout << (unsigned) ((unsigned char)*p++) << ' ';
- cout << endl;
+ std::cout << (unsigned) ((unsigned char)*p++) << ' ';
+ std::cout << std::endl;
len -= 16;
}
}
@@ -66,12 +71,12 @@ namespace mongo {
}
// PRINT(2+2); prints "2+2: 4"
-#define MONGO_PRINT(x) cout << #x ": " << (x) << endl
+#define MONGO_PRINT(x) std::cout << #x ": " << (x) << std::endl
#define PRINT MONGO_PRINT
// PRINTFL; prints file:line
-#define MONGO_PRINTFL cout << __FILE__ ":" << __LINE__ << endl
+#define MONGO_PRINTFL std::cout << __FILE__ ":" << __LINE__ << std::endl
#define PRINTFL MONGO_PRINTFL
-#define MONGO_FLOG log() << __FILE__ ":" << __LINE__ << endl
+#define MONGO_FLOG log() << __FILE__ ":" << __LINE__ << std::endl
#define FLOG MONGO_FLOG
inline bool startsWith(const char *str, const char *prefix) {
@@ -177,7 +182,7 @@ namespace mongo {
char * _buf;
};
- ostream& operator<<( ostream &s, const ThreadSafeString &o );
+ std::ostream& operator<<(std::ostream &s, const ThreadSafeString &o);
/** A generic pointer type for function arguments.
* It will convert from any pointer type except auto_ptr.