Skip to content

Commit

Permalink
Merge pull request #175 from justusc/justusc/fix-range-redundant-ordinal
Browse files Browse the repository at this point in the history
Remove redundant ordinal function
  • Loading branch information
evaleev authored Sep 22, 2024
2 parents 2ca41e9 + 2a44e62 commit 3364fc5
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions btas/range.h
Original file line number Diff line number Diff line change
Expand Up @@ -956,27 +956,13 @@ namespace btas {

/// calculates the ordinal value of \c i

/// Convert an index to its ordinal.
/// \tparam Index A coordinate index type (array type)
/// \param index The index to be converted to an ordinal index
/// \return The ordinal index of \c index
/// \throw When \c index is not included in this range.
template <typename Index>
typename std::enable_if<btas::is_index<Index>::value, ordinal_type>::type
ordinal(const Index& index) const {
return ordinal_(index);
}

/// calculates the ordinal value of \c i

/// Convert an index to its ordinal.
/// \tparam Index A coordinate index type (array type)
/// \param index The index to be converted to an ordinal index
/// \return The ordinal index of \c index
/// \throw When \c index is not included in this range.
template <typename ... Index>
typename std::enable_if<not btas::is_index<typename std::decay<Index>::type...>::value, ordinal_type>::type
ordinal(Index&& ... index) const {
ordinal_type ordinal(Index&& ... index) const {
return ordinal_(std::forward<Index>(index)...);
}

Expand Down

0 comments on commit 3364fc5

Please sign in to comment.