Skip to content

Commit

Permalink
Fix a clang warning about an undefined template (#318)
Browse files Browse the repository at this point in the history
(cherry picked from commit 744c282)
  • Loading branch information
vitaut authored and foonathan committed Oct 23, 2016
1 parent e5e4fb3 commit 3f1cd52
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions fmt/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ typedef __int64 intmax_t;
#endif

#if defined(__clang__) && !defined(FMT_ICC_VERSION)
# define FMT_CLANG_VERSION (__clang_major__ * 100 + __clang_minor__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdocumentation"
#endif
Expand Down Expand Up @@ -830,6 +831,14 @@ struct FMT_API BasicData {
static const char DIGITS[];
};

#ifndef FMT_USE_EXTERN_TEMPLATES
# define FMT_USE_EXTERN_TEMPLATES (FMT_CLANG_VERSION >= 209)
#endif

#if FMT_USE_EXTERN_TEMPLATES
extern template struct BasicData<void>;
#endif

typedef BasicData<> Data;

#ifdef FMT_BUILTIN_CLZLL
Expand Down

0 comments on commit 3f1cd52

Please sign in to comment.