Skip to content

Commit

Permalink
fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
rollbear committed Dec 13, 2019
1 parent 276b933 commit 9993001
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions include/trompeloeil.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1054,12 +1054,12 @@ template <typename T>
};

struct indirect_null {
template <typename T, typename R = decltype(nullptr == std::declval<T>())>
R operator==(const T&) const;
template <typename T, typename R = decltype(nullptr == std::declval<T const&>())>
R operator==(T const&) const;
};

template <typename T, typename U>
using equality_comparison = decltype((std::declval<const T&>() == std::declval<const U&>())
using equality_comparison = decltype((std::declval<T const&>() == std::declval<U const&>())
? true
: false);

Expand All @@ -1072,11 +1072,12 @@ template <typename T>
template <typename T>
inline
constexpr
bool
auto
is_null(
T const &t,
std::true_type)
noexcept(noexcept(std::declval<const T&>() == nullptr))
-> decltype(t == nullptr)
{
return t == nullptr;
}
Expand Down

0 comments on commit 9993001

Please sign in to comment.