42#ifndef TEUCHOS_TO_STRING_HPP
43#define TEUCHOS_TO_STRING_HPP
46#ifdef HAVE_TEUCHOSCORE_QUADMATH
62 static std::string toString(
const T &t )
64 std::ostringstream
oss;
82std::string toString(
const T& t)
92 static std::string toString(
const bool &t )
105 static std::string toString(
const std::string &t )
115 static std::string toString (
const double& t) {
116 std::ostringstream os;
117 os.setf (std::ios::scientific);
128#ifdef HAVE_TEUCHOS_LONG_DOUBLE
133 static std::string toString (
const long double& t) {
134 std::ostringstream os;
135 os.setf (std::ios::scientific);
151 static std::string toString (
const float& t) {
152 std::ostringstream os;
153 os.setf (std::ios::scientific);
165#ifdef HAVE_TEUCHOSCORE_QUADMATH
188 "Teuchos::toString: Failed to print __float128 value: buffer has "
189 <<
bufSize <<
" characters, but quadmath_snprintf wanted "
194 return std::string (
buf);
203template<
typename T1,
typename T2>
206 static std::string toString (
const std::pair<T1, T2>& t) {
207 std::ostringstream
oss;
208 oss <<
"(" << t.first <<
"," << t.second <<
")";
Teuchos header file which uses auto-configuration information to include necessary C++ headers.
Smart reference counting pointer class for automatic garbage collection.
Default traits class for converting objects into strings.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Macro for throwing an exception with breakpointing to ease debugging.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...