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_;