Skip to content

Commit

Permalink
Fix is_address_deducible for MSVC (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
mingxwa authored Jan 16, 2024
1 parent 4d22d2a commit d3b69dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions proxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ consteval bool has_destructibility(constraint_level level) {
// As per std::to_address() wording in [pointer.conversion]
template <class P>
concept is_address_deducible = std::is_pointer_v<P> ||
requires(P p) { std::pointer_traits<P>::to_address(p); } ||
requires(P p) { p.operator->(); };
requires(const P p) { std::pointer_traits<P>::to_address(p); } ||
requires(const P p) { p.operator->(); };

// Bypass function pointer restriction of std::to_address()
template <class P>
Expand Down Expand Up @@ -303,7 +303,7 @@ template <class F>
concept facade = basic_facade<F> && details::facade_traits<F>::applicable;

template <class P, class F>
concept proxiable = facade<F> && details::is_address_deducible<const P> &&
concept proxiable = facade<F> && details::is_address_deducible<P> &&
details::facade_traits<F>::template applicable_ptr<P>;

template <basic_facade F>
Expand Down

0 comments on commit d3b69dd

Please sign in to comment.