Skip to content

Commit

Permalink
Add operator << for std::string type.
Browse files Browse the repository at this point in the history
  • Loading branch information
alja committed Jun 21, 2017
1 parent 6532504 commit 5ea6779
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/XrdSys/XrdSysTrace.cc
Expand Up @@ -175,6 +175,15 @@ XrdSysTrace& XrdSysTrace::operator<<(const char *val)
return *this;
}


/******************************************************************************/
/* < < std::string */
/******************************************************************************/
XrdSysTrace& XrdSysTrace::operator<<(const std::string& val)
{
return (*this << val.c_str());
}

/******************************************************************************/
/* < < s h o r t */
/******************************************************************************/
Expand Down
1 change: 1 addition & 0 deletions src/XrdSys/XrdSysTrace.hh
Expand Up @@ -60,6 +60,7 @@ XrdSysTrace& operator<<(bool val);

XrdSysTrace& operator<<( char val);
XrdSysTrace& operator<<(const char *val);
XrdSysTrace& operator<<(const std::string& val);

XrdSysTrace& operator<<(short val);
XrdSysTrace& operator<<(int val);
Expand Down

0 comments on commit 5ea6779

Please sign in to comment.