From 1cade7ef4dd57ce54d9f56f8cb16104500802da7 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Mon, 4 Sep 2017 13:52:29 -0700 Subject: [PATCH] Remove FMT_USE_RVALUE_REFERENCES --- fmt/format.h | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/fmt/format.h b/fmt/format.h index 4b864028..37fff41c 100644 --- a/fmt/format.h +++ b/fmt/format.h @@ -128,22 +128,6 @@ # define FMT_NORETURN #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 // for std::move -#endif - // Check if exceptions are disabled. #if defined(__GNUC__) && !defined(__EXCEPTIONS) # define FMT_EXCEPTIONS 0 @@ -205,10 +189,9 @@ // makes the fmt::literals implementation easier. However, an explicit check // for variadic templates is added here just in case. // For Intel's compiler both it and the system gcc/msc must support UDLs. -# if FMT_USE_RVALUE_REFERENCES && \ - (FMT_HAS_FEATURE(cxx_user_literals) || \ - FMT_GCC_VERSION >= 407 || FMT_MSC_VER >= 1900) && \ - (!defined(FMT_ICC_VERSION) || FMT_ICC_VERSION >= 1500) +# if (FMT_HAS_FEATURE(cxx_user_literals) || \ + FMT_GCC_VERSION >= 407 || FMT_MSC_VER >= 1900) && \ + (!defined(FMT_ICC_VERSION) || FMT_ICC_VERSION >= 1500) # define FMT_USE_USER_DEFINED_LITERALS 1 # else # define FMT_USE_USER_DEFINED_LITERALS 0 @@ -352,10 +335,6 @@ class numeric_limits : namespace fmt { -#if FMT_USE_RVALUE_REFERENCES -using std::move; -#endif - template class basic_writer; @@ -646,7 +625,6 @@ class basic_memory_buffer : private Allocator, public basic_buffer { } ~basic_memory_buffer() { deallocate(); } -#if FMT_USE_RVALUE_REFERENCES private: // Move data from other to this buffer. void move(basic_memory_buffer &other) { @@ -689,7 +667,6 @@ class basic_memory_buffer : private Allocator, public basic_buffer { move(other); return *this; } -#endif // Returns a copy of the allocator associated with this buffer. Allocator get_allocator() const { return *this; }