diff --git a/format.h b/format.h index a284e5b3..d9d4aff4 100644 --- a/format.h +++ b/format.h @@ -36,13 +36,16 @@ #include #include #include -#include #include #include #include #include #include +#if FMT_USE_CXX11 +# include +#endif + // Compatibility with compilers other than clang. #ifndef __has_feature # define __has_feature(x) 0 @@ -996,6 +999,7 @@ class BasicFormatter { BasicFormatter(BasicWriter &w, const Char *format = 0) : writer_(&w), format_(format) {} +#if FMT_USE_CXX11 // Constructs a formatter with formatting arguments. BasicFormatter(BasicWriter &w, const Char *format, std::initializer_list args) @@ -1004,6 +1008,7 @@ class BasicFormatter { for (const Arg &arg: args) args_.push_back(&arg); } +#endif // Performs formatting if the format string is non-null. The format string // can be null if its ownership has been transferred to another formatter.