extern char log_thread_prefix;
namespace std {
- // This is an awful hack. But sticking this in std:: makes it possible for
- // ostream_iterator to use it.
+ // Sticking this in std:: makes it possible for ostream_iterator to use it.
template <class A, class B>
ostream & operator<<(ostream &o, const pair<A,B> &d) {
return o << "<" << d.first << "," << d.second << ">";
}
#define LOG_PREFIX { \
- auto _thread_ = std::this_thread::get_id(); \
+ auto _thread_ = this_thread::get_id(); \
int _tid_ = thread_name_map[_thread_]; \
if (_tid_==0) \
_tid_ = thread_name_map[_thread_] = ++next_thread_num; \
int _self_ = instance_name_map[this]; \
if (_self_==0) \
_self_ = instance_name_map[this] = ++next_instance_num; \
- cerr << "#" << setw(2) << _self_; \
+ cerr << "#" << setw(2) << " " << _self_; \
}
#define LOG_NONMEMBER(_x_) { \