GetOutput.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include <sstream>
7 #include <string>
8 
9 /*!
10  * \ingroup UtilitiesGroup
11  * \brief Get the streamed output of `t` as a `std::string`
12  */
13 template <typename T>
14 std::string get_output(const T& t) noexcept {
16  os << t;
17  return os.str();
18 }
std::string get_output(const T &t) noexcept
Get the streamed output of t as a std::string
Definition: GetOutput.hpp:14