Go to the documentation of this file.
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
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);
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_
File(File &other) FMT_NOEXCEPT
ErrorCode(int value=0) FMT_NOEXCEPT
FMT_GCC_EXTENSION typedef long long LongLong
~BufferedFile() FMT_NOEXCEPT
BufferedFile & operator=(BufferedFile &other)
static constexpr bool value
BufferedFile & operator=(Proxy p)
int descriptor() const FMT_NOEXCEPT
BufferedFile(Proxy p) FMT_NOEXCEPT
File & operator=(Proxy p)
void print(CStringRef format_str, const ArgList &args)
fmt::BufferedFile & move(fmt::BufferedFile &f)
std::size_t write(const void *buffer, std::size_t count)
File(Proxy p) FMT_NOEXCEPT
FMT_API void print(std::FILE *f, CStringRef format_str, ArgList args)
File & operator=(File &other)
std::size_t read(void *buffer, std::size_t count)
BufferedFile() FMT_NOEXCEPT
FILE * get() const FMT_NOEXCEPT
BufferedFile(BufferedFile &f) FMT_NOEXCEPT
static void pipe(File &read_end, File &write_end)
BufferedFile fdopen(const char *mode)
int get() const FMT_NOEXCEPT
BasicCStringRef< char > CStringRef