Skip to content

Commit b75edfa

Browse files
authored
Merge pull request #2449 from Simon-Janos/Re-introduce-redundant-std-move-at-return-for-old-compilers
Re-introduce std::move at return for old GCC (before version 5) inside an ifdef for e.g. CentOS 7
2 parents 6187923 + 26f69ee commit b75edfa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/spdlog/pattern_formatter-inl.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,7 +1053,11 @@ SPDLOG_INLINE std::unique_ptr<formatter> pattern_formatter::clone() const
10531053
}
10541054
auto cloned = details::make_unique<pattern_formatter>(pattern_, pattern_time_type_, eol_, std::move(cloned_custom_formatters));
10551055
cloned->need_localtime(need_localtime_);
1056+
#if defined(__GNUC__) && __GNUC__ < 5
1057+
return std::move(cloned);
1058+
#else
10561059
return cloned;
1060+
#endif
10571061
}
10581062

10591063
SPDLOG_INLINE void pattern_formatter::format(const details::log_msg &msg, memory_buf_t &dest)

0 commit comments

Comments
 (0)