mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-26 00:21:13 +00:00
Remove FMT_USE_RVALUE_REFERENCES
This commit is contained in:
parent
7413239f49
commit
1cade7ef4d
25
fmt/format.h
25
fmt/format.h
@ -128,22 +128,6 @@
|
|||||||
# define FMT_NORETURN
|
# define FMT_NORETURN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef FMT_USE_RVALUE_REFERENCES
|
|
||||||
// Don't use rvalue references when compiling with clang and an old libstdc++
|
|
||||||
// as the latter doesn't provide std::move.
|
|
||||||
# if defined(FMT_GNUC_LIBSTD_VERSION) && FMT_GNUC_LIBSTD_VERSION <= 402
|
|
||||||
# define FMT_USE_RVALUE_REFERENCES 0
|
|
||||||
# else
|
|
||||||
# define FMT_USE_RVALUE_REFERENCES \
|
|
||||||
(FMT_HAS_FEATURE(cxx_rvalue_references) || \
|
|
||||||
FMT_GCC_VERSION >= 403 || FMT_MSC_VER >= 1600)
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if FMT_USE_RVALUE_REFERENCES
|
|
||||||
# include <utility> // for std::move
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Check if exceptions are disabled.
|
// Check if exceptions are disabled.
|
||||||
#if defined(__GNUC__) && !defined(__EXCEPTIONS)
|
#if defined(__GNUC__) && !defined(__EXCEPTIONS)
|
||||||
# define FMT_EXCEPTIONS 0
|
# define FMT_EXCEPTIONS 0
|
||||||
@ -205,8 +189,7 @@
|
|||||||
// makes the fmt::literals implementation easier. However, an explicit check
|
// makes the fmt::literals implementation easier. However, an explicit check
|
||||||
// for variadic templates is added here just in case.
|
// for variadic templates is added here just in case.
|
||||||
// For Intel's compiler both it and the system gcc/msc must support UDLs.
|
// For Intel's compiler both it and the system gcc/msc must support UDLs.
|
||||||
# if FMT_USE_RVALUE_REFERENCES && \
|
# if (FMT_HAS_FEATURE(cxx_user_literals) || \
|
||||||
(FMT_HAS_FEATURE(cxx_user_literals) || \
|
|
||||||
FMT_GCC_VERSION >= 407 || FMT_MSC_VER >= 1900) && \
|
FMT_GCC_VERSION >= 407 || FMT_MSC_VER >= 1900) && \
|
||||||
(!defined(FMT_ICC_VERSION) || FMT_ICC_VERSION >= 1500)
|
(!defined(FMT_ICC_VERSION) || FMT_ICC_VERSION >= 1500)
|
||||||
# define FMT_USE_USER_DEFINED_LITERALS 1
|
# define FMT_USE_USER_DEFINED_LITERALS 1
|
||||||
@ -352,10 +335,6 @@ class numeric_limits<fmt::internal::dummy_int> :
|
|||||||
|
|
||||||
namespace fmt {
|
namespace fmt {
|
||||||
|
|
||||||
#if FMT_USE_RVALUE_REFERENCES
|
|
||||||
using std::move;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
template <typename Char>
|
template <typename Char>
|
||||||
class basic_writer;
|
class basic_writer;
|
||||||
|
|
||||||
@ -646,7 +625,6 @@ class basic_memory_buffer : private Allocator, public basic_buffer<T> {
|
|||||||
}
|
}
|
||||||
~basic_memory_buffer() { deallocate(); }
|
~basic_memory_buffer() { deallocate(); }
|
||||||
|
|
||||||
#if FMT_USE_RVALUE_REFERENCES
|
|
||||||
private:
|
private:
|
||||||
// Move data from other to this buffer.
|
// Move data from other to this buffer.
|
||||||
void move(basic_memory_buffer &other) {
|
void move(basic_memory_buffer &other) {
|
||||||
@ -689,7 +667,6 @@ class basic_memory_buffer : private Allocator, public basic_buffer<T> {
|
|||||||
move(other);
|
move(other);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
// Returns a copy of the allocator associated with this buffer.
|
// Returns a copy of the allocator associated with this buffer.
|
||||||
Allocator get_allocator() const { return *this; }
|
Allocator get_allocator() const { return *this; }
|
||||||
|
Loading…
Reference in New Issue
Block a user