33 # undef __STRICT_ANSI__ 51 # if defined(_WIN32) && !defined(__MINGW32__) 53 # define FMT_POSIX(call) _##call 55 # define FMT_POSIX(call) call 61 # define FMT_POSIX_CALL(call) FMT_SYSTEM(call) 63 # define FMT_SYSTEM(call) call 66 # define FMT_POSIX_CALL(call) ::_##call 68 # define FMT_POSIX_CALL(call) ::call 72 #if FMT_GCC_VERSION >= 407 73 # define FMT_UNUSED __attribute__((unused)) 78 #ifndef FMT_USE_STATIC_ASSERT 79 # define FMT_USE_STATIC_ASSERT 0 82 #if FMT_USE_STATIC_ASSERT || FMT_HAS_FEATURE(cxx_static_assert) || \ 83 (FMT_GCC_VERSION >= 403 && FMT_HAS_GXX_CXX11) 84 # define FMT_STATIC_ASSERT(cond, message) static_assert(cond, message) 86 # define FMT_CONCAT_(a, b) FMT_CONCAT(a, b) 87 # define FMT_STATIC_ASSERT(cond, message) \ 88 typedef int FMT_CONCAT_(Assert, __LINE__)[(cond) ? 1 : -1] FMT_UNUSED 94 # define FMT_RETRY_VAL(result, expression, error_result) \ 96 result = (expression); \ 97 } while (result == error_result && errno == EINTR) 99 # define FMT_RETRY_VAL(result, expression, error_result) result = (expression) 102 #define FMT_RETRY(result, expression) FMT_RETRY_VAL(result, expression, -1) 133 #if !FMT_USE_RVALUE_REFERENCES 204 int (fileno)()
const;
223 explicit File(
int fd) : fd_(fd) {}
239 #if !FMT_USE_RVALUE_REFERENCES 313 std::size_t
read(
void *buffer, std::size_t count);
316 std::size_t
write(
const void *buffer, std::size_t count);
320 static File dup(
int fd);
332 static void pipe(
File &read_end,
File &write_end);
342 #if defined(LC_NUMERIC_MASK) && !defined(__ANDROID__) 355 typedef locale_t Type;
357 Locale() : locale_(newlocale(LC_NUMERIC_MASK,
"C", NULL)) {
361 ~Locale() { freelocale(locale_); }
363 Type
get()
const {
return locale_; }
367 double strtod(
const char *&str)
const {
369 double result = strtod_l(str, &end, locale_);
377 #if !FMT_USE_RVALUE_REFERENCES 385 #endif // FMT_POSIX_H_ BufferedFile(Proxy p) FMT_NOEXCEPT
BufferedFile & operator=(Proxy p)
FMT_API void print(std::FILE *f, CStringRef format_str, ArgList args)
void write(const mValue &value, std::ostream &os, unsigned int options=0)
BufferedFile(BufferedFile &f) FMT_NOEXCEPT
File & operator=(Proxy p)
int descriptor() const FMT_NOEXCEPT
static constexpr bool value
ErrorCode(int value=0) FMT_NOEXCEPT
File(Proxy p) FMT_NOEXCEPT
BufferedFile() FMT_NOEXCEPT
File & operator=(File &other)
bool read(const std::string &s, mValue &value)
BufferedFile & operator=(BufferedFile &other)
void print(CStringRef format_str, const ArgList &args)
File(File &other) FMT_NOEXCEPT
fmt::File & move(fmt::File &f)
FMT_GCC_EXTENSION typedef long long LongLong