mirror of
https://github.com/fastfloat/fast_float.git
synced 2025-12-08 01:36:49 +08:00
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:
commit
f51af514d1
@ -10,7 +10,6 @@
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <iostream>
|
||||
|
||||
namespace fast_float {
|
||||
|
||||
|
||||
@ -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]);
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#include "fast_float/fast_float.h"
|
||||
|
||||
|
||||
#include <iostream>
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#include "fast_float/fast_float.h"
|
||||
|
||||
|
||||
#include <iostream>
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user