mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 12:57:13 +02:00
WIP
This commit is contained in:
@ -2,9 +2,9 @@
|
||||
|
||||
/**
|
||||
* \file ToString.h
|
||||
*
|
||||
*
|
||||
* Conversion from various types to std::string
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#include "TimeHelper.h"
|
||||
@ -137,4 +137,11 @@ template <typename T> T StringTo(std::string t) {
|
||||
return StringTo<T>(t, unit);
|
||||
}
|
||||
|
||||
/** For types with a .str() method use this for conversion */
|
||||
template <typename T>
|
||||
typename std::enable_if<has_str<T>::value, std::string>::type
|
||||
ToString(const T &obj) {
|
||||
return obj.str();
|
||||
}
|
||||
|
||||
} // namespace sls
|
||||
|
Reference in New Issue
Block a user