MCPcopy Create free account
hub / github.com/1a1a11a/libCacheSim / atof_impl

Function atof_impl

example/cacheHierarchy/fkYAML/node.hpp:5254–5260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5252/// @return true if the conversion completes successfully, false otherwise.
5253template <typename FloatType>
5254inline bool atof_impl(const char* p_begin, const char* p_end, FloatType& f) noexcept {
5255 static_assert(std::is_floating_point_v<FloatType>, "atof_impl() accepts floating point types as an output type");
5256 if (auto [ptr, ec] = std::from_chars(p_begin, p_end, f); ec == std::errc {}) {
5257 return ptr == p_end;
5258 }
5259 return false;
5260}
5261
5262#else
5263

Callers 1

atofFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected