NumCpp
2.5.1
A Templatized Header Only C++ Implementation of the Python NumPy Library
value2str.hpp
Go to the documentation of this file.
1
#pragma once
29
30
#include "
NumCpp/Core/Internal/StaticAsserts.hpp
"
31
32
#include <complex>
33
#include <sstream>
34
#include <string>
35
36
namespace
nc
37
{
38
namespace
utils
39
{
40
//============================================================================
47
template
<
typename
dtype>
48
std::string
value2str
(dtype inValue)
49
{
50
STATIC_ASSERT_ARITHMETIC_OR_COMPLEX
(dtype);
51
52
std::stringstream ss;
53
ss << inValue;
54
return
ss.str();
55
}
56
}
// namespace utils
57
}
// namespace nc
StaticAsserts.hpp
STATIC_ASSERT_ARITHMETIC_OR_COMPLEX
#define STATIC_ASSERT_ARITHMETIC_OR_COMPLEX(dtype)
Definition:
StaticAsserts.hpp:50
nc::utils::value2str
std::string value2str(dtype inValue)
Definition:
value2str.hpp:48
nc
Definition:
Coordinate.hpp:45
include
NumCpp
Utils
value2str.hpp
Generated by
1.9.1