MCPcopy Create free account
hub / github.com/Tracktion/choc / convertToString

Function convertToString

choc/platform/choc_UnitTest.h:167–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165};
166
167template <typename Type>
168std::string convertToString (Type n)
169{
170 if constexpr (std::is_same<const Type, const char* const>::value) return std::string (n);
171 else if constexpr (std::is_same<const Type, const std::string>::value) return n;
172 else if constexpr (std::is_same<const Type, const std::string_view>::value) return std::string (n);
173 else return std::to_string (n);
174}
175
176} // namespace choc::test

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected