Skip to content

Commit

Permalink
Merge pull request #35 from archonitelabs/upstream-work
Browse files Browse the repository at this point in the history
Publish upstream
  • Loading branch information
jxy-s authored Nov 8, 2024
2 parents b0be89c + 3b475d7 commit 933a601
Show file tree
Hide file tree
Showing 17 changed files with 3,563 additions and 59 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*.orig
/compile_commands.json
/LastCoverageResults.log

# vscode
/.vscode/c_cpp_properties.json
Expand Down
4 changes: 4 additions & 0 deletions radiant/Algorithm.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
#pragma once

#include "radiant/TotallyRad.h"
// RAD_S_ASSERT_NOTHROW_MOVE_T uses TypeTraits.h
#include "radiant/TypeTraits.h" // NOLINT(misc-include-cleaner)
// rad::Move needs radiant/Utility.h
#include "radiant/Utility.h" // NOLINT(misc-include-cleaner)

namespace rad
{
Expand Down
5 changes: 4 additions & 1 deletion radiant/Iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,25 +262,28 @@ class ReverseIterator
constexpr PointerType operator->() const noexcept
{
T tmp = m_current;
--tmp;
return tmp;
}

template <typename U = T, EnIf<!IsPtr<U>, int> = 0>
constexpr PointerType operator->() const noexcept
{
T tmp = m_current;
--tmp;
return tmp.operator->();
}

constexpr ReferenceType operator*() const noexcept
{
T tmp = m_current;
--tmp;
return *tmp;
}

constexpr ReferenceType operator[](DifferenceType diff) const noexcept
{
return m_current[static_cast<DifferenceType>(-diff)];
return m_current[static_cast<DifferenceType>(-diff - 1)];
}

constexpr ThisType& operator++() noexcept
Expand Down
Loading

0 comments on commit 933a601

Please sign in to comment.