MCPcopy Create free account
hub / github.com/apache/trafficserver / ConvertStreamTo

Function ConvertStreamTo

lib/yamlcpp/include/yaml-cpp/node/convert.h:143–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141
142template <typename T>
143typename std::enable_if<(std::is_same<T, unsigned char>::value ||
144 std::is_same<T, signed char>::value), bool>::type
145ConvertStreamTo(std::stringstream& stream, T& rhs) {
146 int num;
147 if ((stream >> std::noskipws >> num) && (stream >> std::ws).eof()) {
148 if (num >= (std::numeric_limits<T>::min)() &&
149 num <= (std::numeric_limits<T>::max)()) {
150 rhs = static_cast<T>(num);
151 return true;
152 }
153 }
154 return false;
155}
156
157template <typename T>
158typename std::enable_if<!(std::is_same<T, unsigned char>::value ||

Callers

nothing calls this directly

Calls 1

eofMethod · 0.80

Tested by

no test coverage detected