Add a define to force the use of fallback_file

This commit is contained in:
Matt Stafford
2024-06-06 13:03:49 +10:00
committed by Victor Zverovich
parent 18a9676d95
commit 2c0d9e9409
2 changed files with 13 additions and 4 deletions

View File

@@ -153,11 +153,13 @@ class string_scan_buffer final : public scan_buffer {
class file_scan_buffer final : public scan_buffer {
private:
template <typename F, FMT_ENABLE_IF(sizeof(F::_IO_read_ptr) != 0)>
template <typename F, FMT_ENABLE_IF(sizeof(F::_IO_read_ptr) != 0 &&
!FMT_USE_FALLBACK_FILE)>
static auto get_file(F* f, int) -> glibc_file<F> {
return f;
}
template <typename F, FMT_ENABLE_IF(sizeof(F::_p) != 0)>
template <typename F,
FMT_ENABLE_IF(sizeof(F::_p) != 0 && !FMT_USE_FALLBACK_FILE)>
static auto get_file(F* f, int) -> apple_file<F> {
return f;
}