Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel-kirienko committed Jun 26, 2024
1 parent 87f9764 commit fdf4ef3
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions c++/cavl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,8 @@ class Node
/// of the calls returned true or the tree is empty, a default value is constructed and returned.
/// The tree shall not be modified while traversal is in progress, otherwise bad memory access will likely occur.
template <typename Vis, typename R = invoke_result<Vis, Derived&>>
static auto traverse(Derived* const root,
const Vis& visitor,
const bool reverse = false) -> std::enable_if_t<!std::is_void<R>::value, R>
static auto traverse(Derived* const root, const Vis& visitor, const bool reverse = false) //
-> std::enable_if_t<!std::is_void<R>::value, R>
{
if (Node* const n = root)
{
Expand Down Expand Up @@ -183,9 +182,8 @@ class Node
}
}
template <typename Vis, typename R = invoke_result<Vis, const Derived&>>
static auto traverse(const Derived* const root,
const Vis& visitor,
const bool reverse = false) -> std::enable_if_t<!std::is_void<R>::value, R>
static auto traverse(const Derived* const root, const Vis& visitor, const bool reverse = false) //
-> std::enable_if_t<!std::is_void<R>::value, R>
{
if (const Node* const n = root)
{
Expand Down

0 comments on commit fdf4ef3

Please sign in to comment.