mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-30 05:41:38 +08:00
b09cf765d3
* [msgpack] update version to 4.1.3 * update version * version * clean and fix license * clean and fix license * version * revert * revert * version * fix ci * version * fix coolprop and update version * update version * format patch * version * hash * revert patch * version * update patch * version * add new function * vdb --------- Co-authored-by: Monica <v-liumonica@microsoft.com>
41 lines
1.3 KiB
Diff
41 lines
1.3 KiB
Diff
diff --git a/include/CPstrings.h b/include/CPstrings.h
|
|
index 711981c..9d379d2 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"
|
|
@@ -75,11 +74,12 @@ inline bool endswith(const std::string& s1, const std::string& s2) {
|
|
// 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) {
|