mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-06-07 22:00:16 +08:00
[vcpkg] Fix build on old compilers. (#12950)
This commit is contained in:
parent
08423be155
commit
99b07566f4
@ -4,6 +4,7 @@
|
||||
#include <vcpkg/base/stringliteral.h>
|
||||
|
||||
#include <system_error>
|
||||
#include <type_traits>
|
||||
|
||||
namespace vcpkg
|
||||
{
|
||||
@ -111,7 +112,7 @@ namespace vcpkg
|
||||
ExpectedT(S&& s, ExpectedRightTag = {}) : m_s(std::move(s)) { }
|
||||
|
||||
ExpectedT(const T& t, ExpectedLeftTag = {}) : m_t(t) { }
|
||||
template<class = std::enable_if<!std::is_reference_v<T>>>
|
||||
template<class = std::enable_if<!std::is_reference<T>::value>>
|
||||
ExpectedT(T&& t, ExpectedLeftTag = {}) : m_t(std::move(t))
|
||||
{
|
||||
}
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
#include <initializer_list>
|
||||
#include <type_traits>
|
||||
#include <vector>
|
||||
|
||||
namespace vcpkg
|
||||
@ -29,7 +30,7 @@ namespace vcpkg
|
||||
{
|
||||
}
|
||||
|
||||
template<size_t N, class = std::enable_if_t<std::is_const_v<T>>>
|
||||
template<size_t N, class = std::enable_if_t<std::is_const<T>::value>>
|
||||
constexpr Span(std::remove_const_t<T> (&arr)[N]) noexcept : m_ptr(arr), m_count(N)
|
||||
{
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user