21 #ifndef mia_core_tools_hh
22 #define mia_core_tools_hh
26 #include <boost/call_traits.hpp>
58 template <
typename Data>
62 typedef std::shared_ptr<Data>
PData;
83 std::istringstream sx(s);
92 std::string remaining;
96 for (
auto i = remaining.begin(); i != remaining.end(); ++i)
97 retval &= isspace(remaining[0]);
112 template <
typename T>
127 template <
typename T>
128 const std::string
to_string(
typename boost::call_traits<T>::param_type v)
130 std::stringstream result;
141 template <
typename T>
144 std::stringstream result;
145 int inf = std::isinf(v);
functor to wrap statically allocated data a shared pointer representation
std::shared_ptr< Data > PData
PData operator()(Data &d) const
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
#define NS_MIA_END
conveniance define to end the mia namespace
bool from_string(const char *s, T &result)
const std::string to_string(typename boost::call_traits< T >::param_type v)
A helper class to make it possible to store a non-pointer object or a pointer that must not be freed ...
virtual void operator()(T *)