Use trailing return type instead of deduction

C++11 does not support deduction of return type.
This commit is contained in:
Lars Gullik Bjønnes 2018-02-15 17:34:38 +01:00 committed by Victor Zverovich
parent db86e8d5d3
commit f45f70af09

View File

@ -3199,10 +3199,10 @@ template <typename It, typename Char>
struct formatter<arg_join<It, Char>, Char>:
formatter<typename std::iterator_traits<It>::value_type, Char> {
template <typename FormatContext>
auto format(const arg_join<It, Char> &value, FormatContext &ctx) {
auto format(const arg_join<It, Char> &value, FormatContext &ctx) -> decltype(ctx.begin()) {
typedef formatter<typename std::iterator_traits<It>::value_type, Char> base;
auto it = value.begin;
auto out = ctx.begin();
auto out = ctx.begin();
if (it != value.end) {
out = base::format(*it++, ctx);
while (it != value.end) {