Skip to content

Commit

Permalink
Attempt to fix Github CI errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jwellbelove committed Feb 3, 2025
1 parent 574da35 commit 37fd5b7
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions include/etl/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,27 +54,6 @@ SOFTWARE.

namespace etl
{
#if ETL_USING_STL && ETL_USING_CPP20
//*****************************************************************************
/// Obtain the address represented by p without forming a reference to the object pointed to by p.
/// Defined when using the STL and C++20
//*****************************************************************************
template <typename TPtr>
constexpr auto to_address(const TPtr& p) noexcept
{
return std::to_address(p);
}

//*****************************************************************************
/// Obtain the address represented by p without forming a reference to the object pointed to by p.
/// Defined when using the STL and C++20
//*****************************************************************************
template <typename T>
constexpr T* to_address(T* p) noexcept
{
return std::to_address(p);
}
#else
//*****************************************************************************
/// Obtain the address represented by p without forming a reference to the object pointed to by p.
/// Defined when not using the STL or C++20
Expand All @@ -93,9 +72,8 @@ namespace etl
template <typename Iterator>
ETL_CONSTEXPR typename Iterator::pointer to_address(const Iterator& itr)
{
return itr.operator->();
return etl::to_address(itr.operator->());
}
#endif

#if ETL_USING_STL
//*****************************************************************************
Expand Down

0 comments on commit 37fd5b7

Please sign in to comment.