MCPcopy Create free account
hub / github.com/comaps/comaps / to_any

Function to_any

libs/base/string_utils.hpp:632–635  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

630
631template <typename T, typename = std::enable_if_t<std::is_integral<T>::value>>
632[[nodiscard]] inline bool to_any(std::string const & s, T & i)
633{
634 return internal::ToInteger(s.c_str(), i);
635}
636
637[[nodiscard]] inline bool to_any(std::string const & s, float & f)
638{

Callers 1

UNIT_TESTFunction · 0.85

Calls 3

ToIntegerFunction · 0.85
to_floatFunction · 0.70
to_doubleFunction · 0.70

Tested by 1

UNIT_TESTFunction · 0.68