aboutsummaryrefslogtreecommitdiff
path: root/ports/coolprop/fmt-fix.patch
blob: 9baeb2c628bbc24551daf910bfc7357b9e5b5cd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
diff --git a/include/CPstrings.h b/include/CPstrings.h
index b99820a..fe6a2aa 100644
--- a/include/CPstrings.h
+++ b/include/CPstrings.h
@@ -6,6 +6,8 @@
     #include <algorithm>
     #include <functional>
     #include <cctype>
+    #include <vector>
+    #include <string>
 
 #if !defined(NO_FMTLIB)
     #ifndef FMT_HEADER_ONLY
@@ -14,9 +16,6 @@
     #include "fmt/format.h" // For addition of the string formatting functions and macros from fmtlib
     #include "fmt/printf.h" // For sprintf
     #undef FMT_HEADER_ONLY
-#else
-    #include <vector>
-    #include <string>
 #endif
 
     #include "Exceptions.h"
@@ -58,11 +57,11 @@
     // Missing string formatting function, this old guy is needed for ancient gcc compilers on PowerPC for VxWorks
     inline std::string format(const char* fmt, ...);
 #else
-    // Missing std::string formatting function - provided by the fmtlib library
-    inline std::string format(const char *format, fmt::ArgList args) {
-      return fmt::sprintf(format, args);
+    template<class...Args>
+    std::string format(const Args & ... args)
+    {
+        return fmt::sprintf(args...);
     }
-    FMT_VARIADIC(std::string, format, const char *)
     // For latest FMTLIB
     /*template <typename... Args>
     inline std::string format(const char *format_str, const Args & ... args) {