Skip to content

Commit

Permalink
[vcpkg] Fix build on old compilers. (microsoft#12950)
Browse files Browse the repository at this point in the history
  • Loading branch information
huahang authored Aug 25, 2020
1 parent ca99c15 commit f24b34d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion include/vcpkg/base/expected.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <vcpkg/base/stringliteral.h>

#include <system_error>
#include <type_traits>

namespace vcpkg
{
Expand Down Expand Up @@ -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))
{
}
Expand Down
3 changes: 2 additions & 1 deletion include/vcpkg/base/span.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <array>
#include <cstddef>
#include <initializer_list>
#include <type_traits>
#include <vector>

namespace vcpkg
Expand All @@ -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)
{
}
Expand Down

0 comments on commit f24b34d

Please sign in to comment.