summaryrefslogtreecommitdiffstats
path: root/src/boost/libs/histogram/test/utility_str.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/boost/libs/histogram/test/utility_str.hpp')
-rw-r--r--src/boost/libs/histogram/test/utility_str.hpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/boost/libs/histogram/test/utility_str.hpp b/src/boost/libs/histogram/test/utility_str.hpp
new file mode 100644
index 00000000..a7f67275
--- /dev/null
+++ b/src/boost/libs/histogram/test/utility_str.hpp
@@ -0,0 +1,20 @@
+// Copyright 2019 Hans Dembinski
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_HISTOGRAM_TEST_UTILITY_STR_HPP
+#define BOOST_HISTOGRAM_TEST_UTILITY_STR_HPP
+
+#include <sstream>
+#include <string>
+
+template <class T>
+std::string str(const T& t) {
+ std::ostringstream os;
+ os << t;
+ return os.str();
+}
+
+#endif