26 std::streampos start = in.tellg();
29 if (in.eof() && !file_length_known) {
32 std::istringstream interpreter(buffer, std::istringstream::in);
36 if (interpreter.rdstate() ^ std::ios_base::eofbit) {
42 std::string expecting(std::string(
typeid(
T).name()));
44 (interpreter.rdstate() ^ std::ios_base::eofbit), read_all, expecting, buffer);
46 return (!(interpreter.rdstate() ^ std::ios_base::eofbit)
56 std::ifstream& in, S& value1,
T& value2,
const bool& file_length_known) {
59 std::streampos start = in.tellg();
62 if (in.eof() && !file_length_known) {
65 std::istringstream interpreter(buffer, std::istringstream::in);
67 interpreter >> value1;
68 if (interpreter.rdstate()) read_all =
false;
70 interpreter >> value2;
72 if (interpreter.rdstate() ^ std::ios_base::eofbit) {
78 std::string expecting(std::string(
typeid(S).name()));
79 expecting += std::string(
" ") + std::string(
typeid(
T).name());
81 (interpreter.rdstate() ^ std::ios_base::eofbit), read_all, expecting, buffer);
83 return (!(interpreter.rdstate() ^ std::ios_base::eofbit)
93 std::ifstream& in, S& value1,
T& value2, U& value3,
const bool& file_length_known) {
96 std::streampos start = in.tellg();
99 if (in.eof() && !file_length_known) {
102 std::istringstream interpreter(buffer, std::istringstream::in);
104 interpreter >> value1;
106 interpreter >> value2;
107 if (interpreter.rdstate()) read_all =
false;
109 interpreter >> value3;
111 if (interpreter.rdstate() ^ std::ios_base::eofbit) {
117 std::string expecting(
118 std::string(
typeid(S).name()) + std::string(
" ") + std::string(
typeid(
T).name())
119 + std::string(
" ") + std::string(
typeid(U).name()));
121 (interpreter.rdstate() ^ std::ios_base::eofbit), read_all, expecting, buffer);
123 return (!(interpreter.rdstate() ^ std::ios_base::eofbit)
133 std::ifstream& in, S& value1,
T& value2, U& value3, V& value4,
134 const bool& file_length_known) {
135 bool read_all =
true;
137 std::streampos start = in.tellg();
140 if (in.eof() && !file_length_known) {
143 std::istringstream interpreter(buffer, std::istringstream::in);
145 interpreter >> value1;
147 interpreter >> value2;
149 interpreter >> value3;
150 if (interpreter.rdstate()) read_all =
false;
152 interpreter >> value4;
154 if (interpreter.rdstate() ^ std::ios_base::eofbit) {
160 std::string expecting(
161 std::string(
typeid(S).name()) + std::string(
" ") + std::string(
typeid(
T).name())
162 + std::string(
" ") + std::string(
typeid(U).name()) + std::string(
" ")
163 + std::string(
typeid(V).name()));
165 (interpreter.rdstate() ^ std::ios_base::eofbit), read_all, expecting, buffer);
167 return (!(interpreter.rdstate() ^ std::ios_base::eofbit)
177 std::ifstream& in, S& value1, S& value2, S& value3, S& value4, S& value5, S& value6,
178 const bool& file_length_known) {
179 bool read_all =
true;
181 std::streampos start = in.tellg();
184 if (in.eof() && !file_length_known) {
187 std::istringstream interpreter(buffer, std::istringstream::in);
189 interpreter >> value1;
191 interpreter >> value2;
193 interpreter >> value3;
195 interpreter >> value4;
197 interpreter >> value5;
198 if (interpreter.rdstate()) read_all =
false;
200 interpreter >> value6;
202 if (interpreter.rdstate() ^ std::ios_base::eofbit) {
208 std::string expecting(
209 std::string(
typeid(S).name()) + std::string(
" ") + std::string(
typeid(S).name())
210 + std::string(
" ") + std::string(
typeid(S).name()) + std::string(
" ")
211 + std::string(
typeid(S).name()) + std::string(
" ") + std::string(
typeid(S).name())
212 + std::string(
" ") + std::string(
typeid(S).name()));
214 (interpreter.rdstate() ^ std::ios_base::eofbit), read_all, expecting, buffer);
216 return (!(interpreter.rdstate() ^ std::ios_base::eofbit)