Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
OlafvdSpek committed Jan 3, 2017
1 parent 103e403 commit beddf0b
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions misc/xbt/string_view.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#include <boost/utility/string_ref.hpp>
#include <string>

namespace std
{
using string_view = boost::string_ref;
}

inline std::string& operator+=(std::string& a, std::string_view b)
{
return a.append(b.data(), b.size());
}

inline std::string& operator<<(std::string& a, std::string_view b)
{
return a += b;
}

inline std::string& operator<<(std::string& a, long long b)
{
return a += std::to_string(b);
}

0 comments on commit beddf0b

Please sign in to comment.