Merge pull request #41 from biojppm/fix/bloated_binary

remove 1.1MB (85%) of binary size by not including iostream
This commit is contained in:
Daniel Lemire 2020-11-24 09:13:14 -05:00 committed by GitHub
commit f51af514d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 20 additions and 18 deletions

View File

@ -10,7 +10,6 @@
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
namespace fast_float {

View File

@ -363,8 +363,8 @@ constexpr int binary_format<float>::smallest_power_of_ten() {
} // namespace fast_float
// for convenience:
#include <ostream>
inline std::ostream &operator<<(std::ostream &out, const fast_float::decimal &d) {
template<class OStream>
inline OStream& operator<<(OStream &out, const fast_float::decimal &d) {
out << "0.";
for (size_t i = 0; i < d.num_digits; i++) {
out << int32_t(d.digits[i]);

View File

@ -1,7 +1,7 @@
#include "fast_float/fast_float.h"
#include <iostream>
#include <cassert>
#include <cmath>
@ -56,4 +56,4 @@ int main() {
std::cout << std::endl;
std::cout << "all ok" << std::endl;
return EXIT_SUCCESS;
}
}

View File

@ -1,7 +1,7 @@
#include "fast_float/fast_float.h"
#include <iostream>
#include <cassert>
#include <cmath>
@ -70,4 +70,4 @@ int main() {
std::cout << std::endl;
std::cout << "all ok" << std::endl;
return EXIT_SUCCESS;
}
}

View File

@ -1,6 +1,6 @@
#include "fast_float/fast_float.h"
#include <iostream>
#include <cassert>
#include <cmath>
@ -119,4 +119,4 @@ int main() {
std::cout << std::endl;
std::cout << "all ok" << std::endl;
return EXIT_SUCCESS;
}
}

View File

@ -1,7 +1,7 @@
#include "fast_float/fast_float.h"
#include <iostream>
#include <cassert>
#include <cmath>
@ -57,4 +57,4 @@ int main() {
std::cout << std::endl;
std::cout << "all ok" << std::endl;
return EXIT_SUCCESS;
}
}

View File

@ -1,6 +1,6 @@
#include "fast_float/fast_float.h"
#include <iostream>
#include <cassert>
#include <cmath>
@ -56,4 +56,4 @@ int main() {
std::cout << std::endl;
std::cout << "all ok" << std::endl;
return EXIT_SUCCESS;
}
}

View File

@ -1,6 +1,6 @@
#include "fast_float/fast_float.h"
#include <iostream>
#include <cassert>
#include <cmath>

View File

@ -1,6 +1,6 @@
#include "fast_float/fast_float.h"
#include <iostream>
#include <cassert>
#include <cmath>

View File

@ -1,4 +1,6 @@
#include "fast_float/fast_float.h"
#include <iostream>
#include <cstdint>
#include <random>
@ -212,4 +214,4 @@ int main() {
}
std::cout << "Failure." << std::endl;
return EXIT_FAILURE;
}
}

View File

@ -1,4 +1,5 @@
#include "fast_float/fast_float.h"
#include <iostream>
#include <cstdint>
#include <random>
@ -208,4 +209,4 @@ int main() {
}
std::cout << "Failure." << std::endl;
return EXIT_FAILURE;
}
}

View File

@ -1,5 +1,5 @@
#include "fast_float/fast_float.h"
#include <iostream>
#include <vector>
#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__MINGW64__) || defined(sun) || defined(__sun)