Skip to content

Commit

Permalink
apply clang format
Browse files Browse the repository at this point in the history
  • Loading branch information
cmnrd committed Aug 5, 2022
1 parent 6d642cf commit 4a1b809
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions include/reactor-cpp/value_ptr.hh
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ template <class T, class... Args> auto make_mutable_value(Args&&... args) -> Mut
}
}


namespace detail {

/**
Expand Down Expand Up @@ -510,7 +509,6 @@ public:
friend auto reactor::make_immutable_value(Args&&... args) -> reactor::ImmutableValuePtr<U>;
};


// Comparison operators

template <class T, class U, bool scalar>
Expand All @@ -529,16 +527,20 @@ template <class T, class U, bool scalar>
auto operator==(const MutableValuePtr<T, scalar>& ptr1, const ImmutableValuePtr<U, scalar>& ptr2) noexcept -> bool {
return ptr1.get() == ptr2.get();
}
template <class T, bool scalar> auto operator==(const MutableValuePtr<T, scalar>& ptr1, std::nullptr_t) noexcept -> bool {
template <class T, bool scalar>
auto operator==(const MutableValuePtr<T, scalar>& ptr1, std::nullptr_t) noexcept -> bool {
return ptr1.get() == nullptr;
}
template <class T, bool scalar> auto operator==(std::nullptr_t, const MutableValuePtr<T, scalar>& ptr2) noexcept -> bool {
template <class T, bool scalar>
auto operator==(std::nullptr_t, const MutableValuePtr<T, scalar>& ptr2) noexcept -> bool {
return ptr2.get() == nullptr;
}
template <class T, bool scalar> auto operator==(const ImmutableValuePtr<T, scalar>& ptr1, std::nullptr_t) noexcept -> bool {
template <class T, bool scalar>
auto operator==(const ImmutableValuePtr<T, scalar>& ptr1, std::nullptr_t) noexcept -> bool {
return ptr1.get() == nullptr;
}
template <class T, bool scalar> auto operator==(std::nullptr_t, const ImmutableValuePtr<T, scalar>& ptr1) noexcept -> bool {
template <class T, bool scalar>
auto operator==(std::nullptr_t, const ImmutableValuePtr<T, scalar>& ptr1) noexcept -> bool {
return ptr1.get() == nullptr;
}

Expand All @@ -551,10 +553,12 @@ template <class T, class U, bool scalar>
auto operator!=(const ImmutableValuePtr<T, scalar>& ptr1, const ImmutableValuePtr<U, scalar>& ptr2) -> bool {
return ptr1.get() != ptr2.get();
}
template <class T, class U, bool scalar> auto operator!=(const ImmutableValuePtr<T, scalar>& ptr1, const MutableValuePtr<U, scalar>& ptr2) -> bool {
template <class T, class U, bool scalar>
auto operator!=(const ImmutableValuePtr<T, scalar>& ptr1, const MutableValuePtr<U, scalar>& ptr2) -> bool {
return ptr1.get() != ptr2.get();
}
template <class T, class U, bool scalar> auto operator!=(const MutableValuePtr<T, scalar>& ptr1, const ImmutableValuePtr<U, scalar>& ptr2) -> bool {
template <class T, class U, bool scalar>
auto operator!=(const MutableValuePtr<T, scalar>& ptr1, const ImmutableValuePtr<U, scalar>& ptr2) -> bool {
return ptr1.get() != ptr2.get();
}
template <class T, bool scalar> auto operator!=(const MutableValuePtr<T, scalar>& ptr1, std::nullptr_t) -> bool {
Expand All @@ -570,7 +574,6 @@ template <class T, bool scalar> auto operator!=(std::nullptr_t, const ImmutableV
return ptr1.get() != nullptr;
}


} // namespace detail

} // namespace reactor
Expand Down

0 comments on commit 4a1b809

Please sign in to comment.