From 698d909706adbd3a32ec6f75ae8b70daf9ea5095 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Wed, 28 Feb 2018 06:14:56 -0800 Subject: [PATCH] Workaround a bug in gcc 5.1 --- include/fmt/format.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index 0d577795..95b92447 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -646,8 +646,11 @@ class null_terminating_iterator { return ptr_ >= other.ptr_; } - friend FMT_CONSTEXPR_DECL const Char *pointer_from( - null_terminating_iterator it); + // This should be a friend specialization pointer_from but the latter + // doesn't compile by gcc 5.1 due to a compiler bug. + template + friend FMT_CONSTEXPR_DECL const CharT *pointer_from( + null_terminating_iterator it); private: const Char *ptr_;