make this compile on macos
MODIFY
include/vcpkg/base/files.h
include/vcpkg/base/files.h
@@ -25,12 +25,13 @@ namespace fs
using stdfs::status;
// we want to poison ADL with these niebloids
- constexpr struct {
+
+ namespace detail {
+ struct symlink_status_t {
file_status operator()(const path& p, std::error_code& ec) const noexcept;
file_status operator()(const path& p) const noexcept;
- } symlink_status{};
-
- constexpr struct {
+ };
+ struct is_symlink_t {
inline bool operator()(file_status s) const {
return stdfs::is_symlink(s);
}
@@ -41,7 +42,11 @@ namespace fs
inline bool operator()(const path& p, std::error_code& ec) const {
return stdfs::is_symlink(symlink_status(p, ec));
}
- } is_symlink{};
+ };
+ }
+
+ constexpr detail::symlink_status_t symlink_status{};
+ constexpr detail::is_symlink_t is_symlink{};
inline bool is_regular_file(file_status s) { return stdfs::is_regular_file(s); }
inline bool is_directory(file_status s) { return stdfs::is_directory(s); }

MODIFY
include/vcpkg/base/strings.h
include/vcpkg/base/strings.h
@@ -190,7 +190,7 @@ namespace vcpkg::Strings
// ignores padding, since one implicitly knows the length from the size of x
template <class Integral>
std::string b64url_encode(Integral x) {
- static_assert(std::is_integral_v<Integral>);
+ static_assert(std::is_integral<Integral>::value, "b64url_encode must take an integer type");
auto value = static_cast<std::make_unsigned_t<Integral>>(x);
// 64 values, plus the implicit \0

MODIFY
src/vcpkg/base/files.cpp
src/vcpkg/base/files.cpp
#include <copyfile.h>
#endif
-namespace fs {
- file_status decltype(symlink_status)::operator()(const path& p, std::error_code& ec) const noexcept {
+namespace fs::detail {
+ file_status symlink_status_t::operator()(const path& p, std::error_code& ec) const noexcept {
#if defined(_WIN32)
/*
do not find the permissions of the file -- it's unnecessary for the
@@ -53,7 +53,7 @@ namespace fs {
#endif
}
- file_status decltype(symlink_status)::operator()(const path& p) const noexcept {
+ file_status symlink_status_t::operator()(const path& p) const noexcept {
std::error_code ec;
auto result = symlink_status(p, ec);
if (ec) vcpkg::Checks::exit_with_message(VCPKG_LINE_INFO, "error getting status of path %s: %s", p.string(), ec.message());

make this compile on macos