Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build errors with c++latest. #643

Merged
merged 1 commit into from
Jul 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/vcpkg/base/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace fmt
template<class FormatContext>
auto format(const vcpkg::LineInfo& li, FormatContext& ctx) const -> decltype(ctx.out())
{
return format_to(ctx.out(), "{}({})", li.file_name, li.line_number);
return fmt::format_to(ctx.out(), "{}({})", li.file_name, li.line_number);
}
};

Expand Down
4 changes: 2 additions & 2 deletions include/vcpkg/base/messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ namespace vcpkg
return *this;
}
template<class... Args>
LocalizedString& append_fmt_raw(fmt::string_view s, const Args&... args)
LocalizedString& append_fmt_raw(fmt::format_string<Args...> s, Args&&... args)
{
m_data.append(fmt::format(s, args...));
m_data.append(fmt::format(s, std::forward<Args>(args)...));
return *this;
}
LocalizedString& append(const LocalizedString& s)
Expand Down
6 changes: 3 additions & 3 deletions src/vcpkg-test/ci-baseline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,9 @@ TEST_CASE ("format_ci_result 1", "[ci-baseline]")
cidata.required_success = {
PackageSpec{"pass", Test::X64_UWP},
};
const char* failmsg = "REGRESSION: {0} failed with BUILD_FAILED. If expected, add {0}=fail to cifile.";
const char* cascademsg = "REGRESSION: {0} cascaded, but it is required to pass. (cifile).";
const char* passmsg = "PASSING, REMOVE FROM FAIL LIST: {0} (cifile).";
constexpr const char failmsg[] = "REGRESSION: {0} failed with BUILD_FAILED. If expected, add {0}=fail to cifile.";
constexpr const char cascademsg[] = "REGRESSION: {0} cascaded, but it is required to pass. (cifile).";
constexpr const char passmsg[] = "PASSING, REMOVE FROM FAIL LIST: {0} (cifile).";

SECTION ("SUCCEEDED")
{
Expand Down
4 changes: 2 additions & 2 deletions src/vcpkg-test/json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
// This is the worst, but we also can't really deal with it any other way.
#if __cpp_char8_t
template<size_t Sz>
static auto _u8_string_to_char_string(const char8_t (&literal)[Sz]) -> const char (&)[Sz]
static auto u8_string_to_char_string(const char8_t (&literal)[Sz]) -> const char (&)[Sz]
{
return reinterpret_cast<const char(&)[Sz]>(literal);
}

#define U8_STR(s) (::vcpkg::Unicode::_u8_string_to_char_string(u8"" s))
#define U8_STR(s) (u8_string_to_char_string(u8"" s))
#else
#define U8_STR(s) (u8"" s)
#endif
Expand Down