Skip to content
Snippets Groups Projects
Commit f8e10977 authored by Jan Trávníček's avatar Jan Trávníček
Browse files

operator string for Token

parent 9fae208c
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@
*/
 
#include "Token.h"
#include <sstream>
 
namespace sax {
 
......@@ -55,4 +56,10 @@ std::ostream& operator<<(std::ostream& os, const Token& token) {
return os;
}
 
Token::operator std::string() const {
std::stringstream ss;
ss << *this;
return ss.str();
}
} /* namespace sax */
......@@ -47,6 +47,7 @@ public:
 
friend std::ostream& operator<<(std::ostream& os, const Token& token);
 
operator std::string () const;
};
 
} /* namespace sax */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment