MCPcopy Create free account
hub / github.com/davisking/dlib / unpack_byte

Function unpack_byte

dlib/serialize.h:595–611  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

593
594 template <typename T>
595 inline bool unpack_byte (
596 T& ch,
597 std::istream& in
598 )
599 {
600 std::streambuf* sbuf = in.rdbuf();
601 int temp = sbuf->sbumpc();
602 if (temp != EOF)
603 {
604 ch = static_cast<T>(temp);
605 return false;
606 }
607 else
608 {
609 return true;
610 }
611 }
612
613 #define USE_DEFAULT_BYTE_SERIALIZATION_FOR(T) \
614 inline void serialize (const T& item,std::ostream& out) \

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected