NumCpp
2.18.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
Loading...
Searching...
No Matches
value2str.hpp
Go to the documentation of this file.
1
28
#pragma once
29
30
#include <sstream>
31
#include <string>
32
33
#include "
NumCpp/Core/Internal/StaticAsserts.hpp
"
34
35
namespace
nc::utils
36
{
37
//============================================================================
44
template
<
typename
dtype>
45
std::string
value2str
(dtype inValue)
46
{
47
STATIC_ASSERT_ARITHMETIC_OR_COMPLEX
(dtype);
48
49
std::stringstream ss;
50
ss << inValue;
51
return
ss.str();
52
}
53
}
// namespace nc::utils
StaticAsserts.hpp
STATIC_ASSERT_ARITHMETIC_OR_COMPLEX
#define STATIC_ASSERT_ARITHMETIC_OR_COMPLEX(dtype)
Definition
StaticAsserts.hpp:56
nc::utils
Definition
Utils/cube.hpp:33
nc::utils::value2str
std::string value2str(dtype inValue)
Definition
value2str.hpp:45
include
NumCpp
Utils
value2str.hpp
Generated by
1.15.0