Line | Count | Source |
1 | #include <stdplus/print.hpp> | |
2 | ||
3 | #include <cstdio> | |
4 | #include <system_error> | |
5 | ||
6 | namespace stdplus | |
7 | { | |
8 | void prints(std::FILE* stream, std::string_view data) | |
9 | 1.52k | { |
10 | 1.52k | int r = std::fwrite(data.data(), sizeof(char), data.size(), stream); |
11 | 1.52k | if (r < 0) |
12 | 0 | { |
13 | throw std::system_error(errno, std::generic_category()); | |
14 | 0 | } |
15 | 1.52k | } |
16 | } // namespace stdplus |